The second and final in-class test for this course takes place on Wednesday, April 10. It will cover Chapter 4 and Chapter 5 through Section 5.5. Section 5.6 and 5.7 are not included. You also need to be familiar with basic material covered on labs 6 through 10, especially ArrayLists, which are not covered in the reading from the textbook. However, there will not be any questions about turtle graphics, Vigenère ciphers, or sprites.
While the test will concentrate on material that has been covered since the first test, you still need to know the earlier stuff since the new material builds on old material.
The format of the second test will be similar to the first. 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.
Here is a list of some of the things that you should know about:
black boxes interface and implementation subroutines subroutines as black boxes subroutine call statements: using existing subroutines how to define new subroutines access modifiers public and private return type of a subroutine void subroutines: subroutines that don't return a value dummy paramaters (also called formal parameters) in subroutine definitions actual paramaters in subroutine call statements how subroutine call statements are executed by the computer; return address functions returning a value from a subroutine: the return statement member variables, also called global variables (defined outside any subroutine) how to get at public static variables and subroutines from another class throwing exceptions in subroutines: throw new( ); IllegalArgumentException how to get information into a subroutine: parameters how to get information out of a subroutine: return value behing the scene information sharing: global (member) variables API (Application Programming Interface) 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 local variables: variables defined in a subroutine exist only in that subroutine classes the syntax of class definitions (how subroutines and member variables are defined) static versus non-static: the difference between static and non-static members of a class methods: in Java the term "method" and "subroutine" are almost interchangeable instance variables and instance methods 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 an assignment statement applied to objects will only copy a pointer, not an object the == and != operators applied to objects only compare pointers, not object contents the heap: where objects are stored null why instance variables should usually be private getter and setter methods constructors calling a constructor with the new operator parameters in constructors defining multiple constructors in the same class object-oriented programming designing classes instance variables represent the "state" of an object instance methods represent the "behaviors" of an object subclasses; extending a class: class A extends class B { .... superclass inheritance: subclasses overriding: a subclass can redefine methods inherited from its superclass the access modifier protected polymorphism ArrayLists parameterized types such as ArrayList<String> and ArrayList<Color> list.add(item) list.size() list.get(i) using a for loop to process an ArrayList