CSCE A201 Final Exam Topics
The final exam is closed book and closed notes except for one
8.5x11 page of whatever you would like to put on it (front and back).
You have two hours and 45 minutes. The exam is comprehensive but the emphasis
is on material covered since the last midterm
exam. The emphasis topics are listed below.
Inheritance
-
Using "extends" to create a derived class from a base class, or "implements" to create a class derived from an interface
-
What happens in derived class with base
class variables, methods (public or private or protected)
-
Using "super"
-
Method overriding
-
What we inherit from class Object
-
Multiple types for multi-level inheritance
-
Assigning types going "up" is no problem
-
Must typecast if assigning "down"
-
Dynamic binding - Java invokes the method based on the type of the object when it is created using "new" not the current reference
regardless of type
-
Interfaces and when they are used; Comparable interface
ArrayList, HashMap, and Generics
- Advantages (disadvantages?) of ArrayList over Array
- Ability to use with type of your choice; must be an Object type not a primitive
- Search, add, delete, type operations from ArrayList or HashMap
- Combining multiple generic types, e.g. ArrayList of HashMap
- Cases where you need to override equals, compareTo, etc.
- You won't need to make your own generic type
Reference Variables / Linked Data Structures
-
What is stored in a reference variable when we create
an object via "new" (i.e. address of object)
Exceptions
- What an exception is
- try, catch
- Exception object, using different exception classes
(IOException, NumberFormatException, etc.)
File I/O
- Be able to read data (strings, ints, doubles, etc.) from a text file or binary file
- Be able to write data to a text file or binary file
Recursion
- Write a short recursive program
- Idea of a base case / termination condition,
recursive call