Test 2 Review
(Exam Date: Wednesday, 4 Apr 2001,
7:00 - 7:50 PM)
Logistics:
50 minute exam
Closed book / closed notes
No cheating / no make-up exam
Responsible for:
material in overheads
concepts discussed in class
OO concepts from all three programming assignments
Topics:
Object Oriented Paradigms
-
Encapsulation
-
Polymorphism , Dynamic Binding
-
Inheritance (notion of classes that extend within a hierarchy)
-
Interfaces (anywhere in hierarchy from which classes may implement)
-
Hierarchies, Is-a and Has-a relationships
Subtypes
-
Types and Subtypes
-
Principle of Substitutability
Binding in Java
-
References to objects
-
Classes and subclasses (types and subtypes)
-
Casting (explicit and implicit)
Cloning : Deep Copy vs Shallow Copy
-
Shallow copy concept
-
Deep copy concept
-
clone() method, overriding
-
Semantic consistency of clone(), equals(), hashcode()
-
interface Cloneable
Threads
-
Thread concept
-
Thread states and life cycle
-
Thread creation in Java: extending Thread class vs implementing Runnable
interface
-
Starting a thread
Frameworks
-
I/O Framework (we began covering this topic, but you're not responsible
for this material yet)
-
Byte Streams (not on this test)
-
Character Streams: Reader / Writer (not on this test)
Promises
-
On several occasions we've referred to the accessibility attributes table
found in our text, and also in yellow in our class notes! You are
responsible for the information this table contains.
-
We discussed the difference between equivalence and equality of objects.
You will be given true/false questions! (but not the usual kind...)
Be prepared to evaluate boolean Java expressions that perform comparisons
based on equivalence or equality.
-
We discussed classes (types) and subclasses (subtypes) in the context of
casting (implicit and explicit) and variable bindings for references to
objects. Be prepared to trace the execution of a small Java application
with variables that bind to different types objects during the application's
execution.
-
We discussed cloning and the Cloneable interface. Be prepared to
trace the execution of a small Java application that involves a Cloneable
object and cloning.
-
Be sure you understand the concept of a Java application with multiple
threads of execution. In the class notes, study the sample Java application
that uses threads. You'll be asked to trace possible executions of
some very similar code.
-
In assignment #2, we overrode the toString() method of class Object, which
played a role in printing out the shapes we stored in a Vector. You'll
be asked a question about the need for casting while iterating through
the shapes Vector and printing out the shapes.