ALGORITHM DEVELOPMENT CS 139
Popular in Course
Popular in ComputerScienence
This 5 page Study Guide was uploaded by Mable Windler on Saturday September 26, 2015. The Study Guide belongs to CS 139 at James Madison University taught by Staff in Fall. Since its upload, it has received 12 views. For similar materials see /class/214136/cs-139-james-madison-university in ComputerScienence at James Madison University.
Reviews for ALGORITHM DEVELOPMENT
Report this Material
What is Karma?
Karma is the currency of StudySoup.
You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!
Date Created: 09/26/15
CS139 Sections 3 amp 4 Fall 2001 semester Study Guide for Final Examination Time and Place for the Examination Monday 10 Dec 2001 10301230 hrs in our regular classroom ISATCS Room 236 Rules for the Examination No calculators m texts m notes Scope of the Examination The examination will be cumulative going back to the very beginning of the semester Some emphasis however will be placed on material covered since the second midterm Format of the Examination Some questions will be shortanswer MultipleChoice including YesNo and TrueFalse and possibly FillintheBlank You will also be asked to study some code snippets to rewrite any line of code that has a syntax error or if there is no syntax error then to describe thoroughly what output will be produced when the code is executed Note that it is only a syntax error that is to be corrected that is an error that would prevent the code from compiling Any logical error that may be present in such a question is not to be corrected Instead you are required to indicate what output would be produced by the legal Java code even though that output might be absurd outrageous Page 1 of4 06 Dec 2001 Study Guide for Final Examination You may also be asked to complete a code snipped by supplying a missing line of code Coverage of the Examination Note that as speci ed in the course syllabus you are responsible for everything in the reading assignments regardless of whether or not it was covered in class and that you are also responsible for everything covered in class regardless of whether or not it was covered in the reading assignments Please note that the detailed summary of course content provided here is speci cally intended not to limit the coverage on the examination Regardless of whether or not a particular topic is listed here if we covered it either in class or in the laboratory or if it is included in your reading assignments then you are responsible for it and questions on it may occur in the examination The following summarizes what we covered during the semester 1 Numerology 999 D positional number notation in a variety of radices conversion of a decimal integer to a number of arbitrary radix conversion of an integer of arbitrary radix to decimal interconversion of an integer between binary octal and hexadecimal number representation systems determination of how many di erent things can be represented by a speci ed number of bits determination of how many bits are required to provide a unique representation for a speci ed number of items 2 Shackelford s book and related topicsimplementation in Java a gearrmeogop 06 Dec 2001 properties of good algorithms data structures data manipulation instructions conditional expressions control structures modularity and why it is important operators assignment arithmetic IO atomic in Java primitive data types complex in Java class data types constants de ned and literal decision sstructures Boolean operators parameters and parameter types in out and inout Page 2 of4 Study Guide for Final Examination P F EJT Q UO procedures void methods in Java and functions methods with nonvoid return types in Java scope recursion trees binary trees binary search trees arrays including multidimensional arrays and also multidimensional arrays in Java linked lists traversals 3 Savitich s chapters 12 and 3 a b c F Q JH FD evpparw r 06 Dec 2001 spelling rules and conventions in Java compilation and execution of Java programs Java Byte code basics ofa Java program 1 primitive types ii Java classes iii methods iv the method main declarations i types primitive and class ii 8 primitive types and the storage requirements for each of them iii assignment compatibilities for primitive types iv builtin class type String v variables of class type vi arrays vii initialization of variables viii numeric constants de ned constants and literals iX assignment compatibilities and typecasting input using Savitchln output to the screen arithmetic operators increment and decrement postdecrement integer division simple integer division modular division and oatingpoint division String constants and variables and String methods concatenation of strings escape characters operators preincrement postincrement predecrement Unicode z39fstatements simple if if else and nested if else switch statement and break while statement and break do whz39le statement and break for statement and break Page 3 of4 Style Guide for CS 139 Fall 2004 Style Guides or programming standards provide an organization with a consistent way of formatting all programs such that one programmer knows what to expect from another It helps to debug programs and to maintain programs written by another For this class the guidelines that we use will follow the book conventions which are the primary conventions of most java programmers Reference Lewis and Loftus text Appendix F NOTE Failure to follow these guidelines will result in points taken offon your programming tests Failure to put a header on a lab assignment will result in a 1 point reduction in the grade Format Each class must be in its own le and that file name must match the class name exactly For example the Sort class would have a corresponding le Sortjava Class identi ers must start with an upper case letter Ex Money Shape Variable method and function identi ers must start with a lower case letter Ex myGrade amount Named constant identi ers must be in all upper case Ex Pl PROGRAMCOUNT All names used in a program must be descriptive Only temporary index variables and counters may use generic names Ex studentName average currentTemperature Separate words in names with an underscore or a capital letter Ex myGrade or mygrade Methods and functions should be listed in the program in alphabetic order An exception is main which should be rst in any program with main and constructors If both main and constructors are present in the same le constructors should come rst followed by main followed by all other methods and functions in alphabetic order All variables should be declared at the start of their class function method or block in which they are used All variables should be in alphabetic order by type Ex double comes before oat which comes before integer Only variables that are used in the program should be declared 9 Variables should be described if their use is not obvious from their name as an inline comment 10 Initialization should not be done at the point of declaration but should be done immediately before first use 11All code must be appropriately indented lndenting must be consistent Braces for statement blocks must line up A JON A 01 O l G Heading 1 I All program source les must contain a header containing the following information in the following order in the top left hand corner ofthe page or le as a series of comment lines a Name followed by your name preferred name is ne b Date followed by the last modi cation date for this file 0 Assignment followed by the name or description ofthe assignment All programming test les must contain an Acknowledgements and References section which contains the sources of information that you used to complete the lab You do not need to include instructor assistance but should indicate any other help that you received including TA help In addition to citing who provided the help you must also state in which part ofthe code or other part ofthe assignment the assistance occurred Example of the header for a programming assignment Name Date Nancy Harris September 16 2002 Assignment First Java Program References and Acknowledgements I received no outside help with this programming test Documentation 1 2 Every class should have a brief description of its purpose Every method A 4 Block comments should use the javadoc format to begin the block and to end Use block comments to describe the purpose of each method See the program template for an example ofjavadoc commenting The only exception is the header as described above Use incline comments for that V thin the program use line comments including main should have a brief comment describing its purpose its inputs and its outputs Treat these comments like an English paper use correct spelling and grammar Input and output may be abbreviated as long as it is clear what you are describing For example INPUT the length of a side as an integer You should also provide helpful inline comments using the comment designator lfan inline comment is describing a block of activity it should
Are you sure you want to buy this material for
You're already Subscribed!
Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'