The second and final in-class test for this course takes place on Monday, November 7. It will concentrate on material that has been covered since the first test (but since the newer material builds on the older, you still need to know the earlier stuff). The format will be similar to the first test. The test will be four pages long. It can include definitions and short answer questions similar to those given on the quizzes; longer essay-type questions; questions that ask you to write code segments, subroutines, classes, or complete programs; and questions that ask you to determine the purpose or the output of some given code.
The test covers all of Chapter 4; Chapter 5, Sections 1 through 4; and Labs 6 through 10. Topics include subroutines and the basics of objects and classes. There will not be any questions on using the Eclipse IDE, and there are no questions on using files with TextIO or on encoding/decoding text.
Here is a list of some of the things that you should know about:
subroutines black boxes interface and implementation contract of a subroutine subroutine call statements static access modifiers public and private return type void the parameter list of a subroutine member variables static subroutines and static member variables accessing a static subroutine or member variable in another class default initial values for member variables global variables versus local variables. dummy parameters (also known as formal parameters) actual parameters overloading (of subroutine names) throwing exceptions in subroutines IllegalArgumentException IllegalStateException functions the return type of a function return values the return statement in functions using a return statement in a void subroutine the syntax of class definitions (how subroutines and member variables are defined) top-down design and bottom-up design the role of subroutines in top-down and bottom-up design API (Application Programming Interfaces) packages the package java.lang the import directive, such as "import java.util.ArrayList;" or "import java.awt.*;" Javadoc and Javadoc-style comments combining declaration and initialization, as in "int count = 0;" named constants (symbolic constants) and the "final" modifier why named constants should be used scope a local variable or parameter name can hide a member variable methods instance variables and instance methods the difference between static and non-static members of a class how to refer to the instance variables and instance methods in an object the relationship between classes and objects class names as types (used for declaring variables, parameters, and return types) pointers (also known as references) variables do not hold objects; they hold pointers to objects null how objects work in assignment statements comparing objects with == and != why instance variables should usually be private getter and setter methods constructors the default constructor in a class that does not define a constructor explicitly calling a constructor with the new operator parameters in constructors defining multiple constructors in a class (constructor overloading) garbage collection object-oriented programming designing classes instance variables represent the "state" of an object instance methods represent the "behaviors" of an object using a for loop to process all the characters in a String the ArrayList type: methods list.add(item), list.size(), list.get(i) using a for loop to process all the items in an ArrayList