You are on page 1of 7

Computer Science III H Semester 1 Review 2016

Name: ________________________________________

NOTES: Teacher will provide key prior to exam, but extra credit will only be given if review completed (IN YOUR OWN
HANDWRITING) before the key is made available. Im aware that not everything on the list is a question I maintain that you can
say something (give an example, etc.) for each one. Yes, I do give part credit. Yes, you may alter the formatting to suit yourself
before you print as long as you dont alter the order or disappear any questions.
Chapter 23
Objective 1 - Declaring Variables
What are the Java program keyword categories?
Recognize correct declaration and initialization of variables.
Recognize examples of reserved words.
Objective 2 - The Integer Data Type
Recognize the Java integer data types.
Recognize the Java integer arithmetic operators.
Recognize the results of integer division.
Objective 3 - The Real Number Type
Recognize the Java real number data types.
Recognize the Java real number arithmetic operators.
Know the size of the real number data types.
Objective 4 - Unary Operators
Recognize prefix and postfix unary operators, their differences, and their results.
Recognize that you should not combine shortcut operators.
Objective 5 - Binary Operator Shortcuts
Recognize binary shortcuts and their results.
Objective 6 - The Character and String Data Types
Recognize the syntax and results of string concatenation.
Recognize the behavior of string types and numeric types in concatenation.
Objective 7 - The Boolean Data Type and Constants
Who is George Boole?
Recognize the behavior of Boolean variables.
Recognize that constants cannot be changed after they are declared and initialized.
Objective 8 - One-Way Selection
Read code involving one-way selection.
Recognize that indentation does not affect program logic.
Objective 9 - Two-Way Selection
Read code involving two-way selection.
What do one-way and two-way selection have in common?
Objective 10 - Multiple-Way Selection
(Note: this is *not* on AP test.)
Recognize keywords used in multiple-way selection.
Read code involving multiple-way selection.
Objective 11 - Repetition with <for>
Read code involving repetition with <for>
Objective 12 - Conditional Repetition with <while> and <do..while>
Read code involving repetition with <while> and <do..while>
Debug code involving repetition with <while> and <do..while>
Objective 13 - Nested Selection
Read code involving nested selection.
Debug code involving nested selection. Be aware of the difference between syntax, runtime, and logic errors.

Objective 14 Nested Iteration


Read code involving nested iteration.
Objective 15 - Compound Conditions
Recognize the operators for logical and, or, and not.
Read code involving compound conditions.
Objective 16 - Command-Line Text Input
Recognize that all input is String.
What identifier stores values from command-line input?
What happens if more or fewer command-line arguments are entered than are used?
Objective 17 - Text Input with System.in
Recognize that System.in refers to the keyboard.
What must you import to use System.in?
What do Integer.parseInt and Double.parseDouble do?
Why must you include throws IOException?
Chapter 24
Objective 1 - OOP Terminology
Recognize OOP terms from the chapter.
What is a class? What is an object?
Recognize alternate names for methods and data.
What is instantiation?
Define structured programming. Define OOP.
What is the most important program feature?
Objective 2 - Constructors
What is a constructor?
What is a default constructor?
What is an overloaded constructor?
What is a copy constructor?
Objective 3 Accessing Attributes and Methods
Access to an objects data attributes should be limited to what?
Data attributes should be declared as what?
Which methods should be public and which private?
Objective 4 - Working with Multiple Files
What is the correct relation of the file name to the class name?
How many main method(s) per multiple-file Java program?
Can you compile a class that does not contain a main method?
Why would you divide programs into multiple files?
Objective 5 - Scope of an Object
What is scope?
Read code concerning object scope.
Objective 6 - Objects Are References
Recognize the result when you assign an object directly to another object.
Read code involving objects.
Recognize that an object identifier hold a memory address. Recognize the results of this fact in code.
What is aliasing?
Recognize that simple data types hold the actual data, not a memory address.
Objective 7 - Composition, Information Hiding and Static Methods
What is composition? What is inheritance?
Recognize the has-a and is-a relationships.
What is information hiding?
Why do you use information hiding?
What are static methods and attributes, and how do they work?
Objective 8 - Drawing Lines and Pixels
What package is required for Java graphics?

Do you have to execute graphics in a browser?


Recognize the methods of the Graphics class.
How do you draw a single pixel?
Objective 9 - Drawing Rectangles and Squares
Recognize methods used for drawing rectangles and squares, and their parameters.
Read code to draw rectangles and squares.
Objective 10 - Drawing Ovals, Circles and Arcs
Recognize the similarity of drawing ovals and drawing rectangles.
Recognize different ways to draw a circle.
Recognize method calls to draw given arcs.
Objective 11 - Controlling Color
What are the primary colors of light?
Recognize that you can use pre-defined or user-defined colors.
Recognize correct syntax for user-defined colors.
Objective 12 Displaying Graphics Text
What class contains drawString?
How do you set bold, italic, size, and font type?
What method sets text color?
What happens if you specify a font that is unavailable?
Objective 13 - Displaying Polygons
What class contains drawPolygon?
What class contains addPoint?
Recognize the result of code to draw polygons. Watch for trick questions.
Objective 14 - Mathematics and Polygons
How do you draw regular polygons?
Recognize the code to draw a circle.
Recognize the code to draw regular polygons of various sorts.
Chapter 25
Objective 1 - Inheritance Introduction
What is inheritance?
What mathematic field is commonly used to illustrate inheritance?
What are the is-a and has-a relationships?
What are subclasses and superclasses?
What are composition and inheritance?
Objective 2 - Inheritance Syntax
What keyword is used with inheritance?
Recognize correct inheritance syntax.
Recognize the operation of constructor calls with subclasses and superclasses.
Objective 3 - Passing Information to a Super Class
Recognize that the superclass constructor is called first.
Recognize that you must explicitly call the parameter constructor of a superclass. Also recognize simple syntax errors.....
Recognize that a superclass call must be the first statement in a subclass constructor.
Objective 4 - Overriding SuperClass Methods
What is an overloaded method?
What is a signature?
Recognize the correct use of the super keyword.
Objective 5 Public, Private and Protected
Recognize the effect of public, private, or protected attribute and method declarations.
Recognize that at this point package means having an inheritance relationship.
Recognize the result of code that uses the above keywords.
Objective 6 - Composition and Multiple Inheritance
Recognize code using composition and inheritance.

Recognize that composition can be nested.


Recognize that Java does not support multiple inheritance. (More than one *parent*.)
Recognize that for both composition and inheritance the appropriate constructor(s) need to be called in the subclass constructor.
Chapter 26
Objective 1 - Data Structure Definitions
What is a data structure?
What is the first historical data structure?
What is an array?
What is a record?
What is a file?
What is a stack?
Recognize that data structures are defined both by storage and access.
What programming language introduced the array?
Objective 2 - Static One-Dimensional Arrays
Recognize array declarations, how many items they store, and the indices of the items.
Given code involving arrays and loops, recognize the output.
Recognize the default values for arrays of primitive data types.
Read code involving arrays that are initialized when they are defined.
Recognize code that will cause errors.
Objective 3 Random Array Elements
Read code involving random numbers in a specified range.
Objective 4 - Two-Dimensional Arrays
Recognize correct declaration of a 2-D array.
Recognize output of code involving 2-D arrays, including Javas default values and code that will cause errors.
Recognize the use of the length attribute.
Recognize the result of somewhat (not terribly) tricky code to fill a matrix with various patterns of numbers.
Objective 5 - The List Class
Recognize that the existing Java array only stores values; it does not process them.
Read code that implements a list class with processing methods. Be alert for somewhat tricky questions.
Objective 6 - Sorting and Searching
Recognize best use for various sorts, including smart and dumb bubble sorts.
Recognize code for various sorts and searches.
Given an amount of data, state the required comparisons with a binary search.
Objective 7 - The ArrayList Class
Recognize correct syntax for ArrayList code.
Be aware that an ArrayList can be resized.
Recognize ArrayList methods. Read code involving same.
Chapter 27
Objective 1 - Using the toString Method
What methods automatically call the toString method?
In what class is toString originally defined?
How does toString behave with primitive data types vs. with objects?
Given code with toString and various data types, state output.
Objective 3 - Redefining the toString Method
Recognize that print and println call the toString method automatically.
Be able to fill in a toString method to produce the specified output.
Be able to recognize the output of a given toString method.
Objective 4 - The TimeTest Class
What class does the TimeTest class use to determine elapsed time?
What are the methods of the TimeTest class?
What classes/object does it use?
What methods does it redefine?

Objective 5 Comparing the == Operator to the equals Method


Which is used for primitive data types and which for objects?
Recognize the result of code that uses the == operator on both primitive data types and objects.
Recognize the result of code that uses the equals method.
Objective 6 Redefining the equals Method
Where is the equals method originally defined?
Recognize the difference between overloading and redefining.
Read code involving overloading and redefining of the equals method.
Objective 7 Random Array Elements
Where is compareTo originally defined?
What are the requirements to implement the Comparable interface?
Where is toString originally defined?
Recognize correct implementation of compareTo. Recognize that objects must be cast to the correct type.
Objective 8 - A Close Look at Parameter Passing
How are parameters passed in Java?
Recognize output of code involving parameter passing. Watch out for trick questions.
Recognize the difference between changing references and changing value.
Chapter 29
Objective 1 - Data Vocabulary
What is a data type?
Recognize primitive data types.
What is an ADT?
What are the characteristics of a data structure?
Objective 2 - Information Hiding
What is information hiding?
What situations are analogous to information hiding?
Why do you use information hiding?
When do you use information hiding?
Objective 3 - Stacks at the Abstract Level
How are stack elements accessed?
What are the stack operations?
Objective 4 - Using the MyStack Class
Read code involving use of MyStack Class.
Objective 5 Implementing the MyStack Class
Given a method of the MyStack Class, recognize its function.
Recognize that a stack class can be implemented with a variety of storage options (ArrayList, static array, etc.).
Chapter 30
Objective 1 - Queue Definition
How does a queue access data?
What is the related acronym?
How does a queue differ from a stack?
Recognize that elements of a queue must be the same type. (I know this is not reality, but it is the way a queue *should* be used.)
Objective 2 - Queues at the Abstract Level
What are the purposes of the methods of a queue class?
Objective 3 - Using a Queue Class
Given programs that use queue and stack methods, state results.
Given a program with a missing segment of code, recognize code that will cause correct operation.
Objective 4 Implementing the Queue Class
Given code, recognize purpose.
Recognize that a Queue class can be implemented with different types of storage.
Recognize that Queue methods should prevent improper access, regardless of storage type.

Recognize correct implementation of queue methods.


Chapter 31
Objective 1 - The Collection Hierarchy
What is a collection, graph collection, hierarchical collection, unordered collection, list, bag, array, set, queue?
Objective 2 - Java Collections
Be able to state if Java collections are classes, abstract classes, interfaces, subinterfaces, etc.
Recognize code using Java collections. Be alert for which are abstract and which are not.
Recognize the methods of Java collections.
Recognize which are sorted and unsorted.
Recognize which allow duplicates.
Objective 3 - Linked Lists, Hashing and Trees
Recognize the definitions of linked list, trees (of various sorts), hash tables.
Objective 4 - Interfaces and Implementations
What is the difference between a class declaration and an interface declaration?
Which Java keyword is optional in the interface declaration?
Recognize correct implementation of an interface.
Recognize that all the methods of an interface must be implemented.
Recognize that more than one class may implement an interface.
What is the primary difference betwee LInkedList and ArrayList?
Recognize that accessor methods in these classes return objects.
Objective 5 Abstract Classes
What is the difference between an abstract class and an abstract interface?
How do you implement an abstract class?
What is an advantage of an abstract class over an interface?
Can an interface have a data field?
Objective 6 - Iterators
The iterator method is a member of what class?
Recognize correct code to create an iterator object.
Recognize the methods of the Iterator class and their uses.
Chapter 32
Objective 1 - Recursion Fundamentals
What is recursion?
What is a base case?
What data structure uses LIFO?
What handles the program execution sequence?
Recognize pre, post, and mutual recursion.
Evaluate recursive method calls. See sample programs and exercises.
Objective 2 - Recursive Return Methods
Evaluate recursive return methods. . See sample programs and exercises.
Objective 3 Determining the Action of a Recursive Method
Recognize the action of recursive methods. (i.e., GCF, factorial, addition, multiplication, etc.) See sample programs and exercises.
Objective 4 - The Fibonacci Sequence
Recognize the Fibonacci sequence.
Compare iterative and recursive Fibonacci methods.
Evaluate calls to recursive Fibonacci methods.
Recognize correct code to computer Fibonacci numbers.
Objective 5 - Recognizing Different Kinds of Search Algorithms
Recognize code for iterative and recursive searches.
Objective 6 - Why Use Recursion?
Compare and contrast recursion and iteration.

Objective 7 - A Really Nasty Recursive Method


Evaluate really nasty recursive method. See sample programs and exercises.
Objective 11 - Merge Sort Case Study
What is the best case for a merge sort?
What is the base case for a recursive merge sort?
What are the steps of the merge sort algorithm?
Recognize correct calls to a mergeSort method.
Objective 10 - Mutual Recursion
What is mutual recursion?
Where must the base case be located?
Evaluate method calls involving mutual recursion.

You might also like