CIS 3115
Modern Programming Techniques
Final Exam Topic List
The exam is cumulative with an emphasis on the topics covered since the last exam: interfaces, inheritance, polymorphism, basic collections, generics (Lectures 6-8)
Command-line Arguments
You should be able to process an app with commend-line arguments.
Interfaces
- What they are
- Their syntax
- Implementing an interface
- Interface Inheritance
- Abstract Classes and methods
- What they are
- Their relationship with interfaces and concrete classes
- You will not be asked to write any code using an abstract class
Class Inheritance
- Superclasses/subclasses
- class hierarchies
- Object as the root of the Java class hierarchy
- protected
- up/downcasting
- overriding methods
- overloading vs overriding
- You should understand the differences and consequences of creating a class using composition, inheritance or 'standalone'
(i.e., starting from scratch with no relationship)
- use of
super
Polymorphism
- Rule of Polymorphism: method resolution is based on the (runtime/dynamic) type of the object and not the
(static/compile-time) type of the receiver reference variable.
ArrayList
- You should know the differences between an ArrayList and an array
- creating
- You should know the following methods:
add(val)
, add(int index, Object val)
, get(int index)
, set(int index, Object val)
, remove(Object val)
, remove(int index)
contains(Object val)
, size()
, isEmpty()
- You should be able to code a simple app using an
ArrayList
(e.g. Lab 8)
Generics & Autoboxing
- You should understand how generics and autoboxing each simplify using colections like ArrayList
- You should understand raw vs generic ArrayList
- You should be able write the correct code to insert an object (e.g., a
String
) into a raw ArrayList
as well
as extract it (requiring downcasting) (and of course into a generic ArrayList
of the correct type..
- You should understand why putting thing into a (raw) collection is an upcast, while removing from a collection
requires a downcast
Labs and Lecture Notes Code
- And as always, all the labs and sample code in the lecture notes are fair game for questions (except Lab 5 -- the maze; though I might throw in an extra-credit question on that)e
- and although I did say the exam is cumulative, I want to stress that you need to be able to code class definition.