You are responsible for all material presented in lecture. You are also responsible for all material covered in lab and the concepts taught by any programming assignments.
Answering the applicable "self-test" questions in each chapter of the recommended text (by Savitch) is also a good way to review. The answers to the self-test questions are found at the end of each chapter.
DO NOT EXPECT to see these specific questions on your exam.
Note that Exam 3 is a comprehensive final exam. Although the bulk of the questions will come from the topics covered since Exam 2, you should be prepared to answer questions about the important principles and techniques of OOP covered throughout the semester (e.g. encapsulation, inheritance, polymorphism, interfaces).
Use the following class definition when answering the questions below.
public class Utility { // no instance variables //..... }
First
that returns the
the first object from an ArrayList<T> of any base type as it would appear in the Utility class above.First
would be called from main( )
for an
ArrayList of objects of type Bob.
T object = new T();
public class RClass<T extends Comparable<T>>
Box
that
contains objects of any type and supports the following operations.
What design decisions must be considered for these Box operations?Given the class definition for Box
above,
List<Integer> myList = new ArrayList<Integer>( ); myList.add( 42 ); myList.add( 57 ); myList.add( 95 ); myList.add( 6 ); myList.add( 12 ); myList.add( 105 );