Main Page
Syllabus
Lecture Notes
Projects
Labs
Other links
CS 1054: Introduction to Programming in Java
Final Exam topics
The topics from which you might expect questions for the final exam are given below. You should focus on the topics indicated in bold.
Objects and classes
Objects and classes
Creating objects
Calling methods
Parameters
Data tpes
Multiple instances
State
What is in an object?
Object interaction
Source code
Another example
Return values
Objects as parameters
Summary
Understanding class definitions
Ticket machines
Examining a class definition
Fields, constructors and methods
Passing data via parameters
Assignment
Accessor methods
Mutator methods
Printing from methods
Summary of the naive ticket machine
Reflecting on the design of the ticket machine
Making choices: the conditional statement
A further conditional-statement example
Local variables
Fields, parameters and local variables
Summary of the better ticket machine
Reviewing a familiar example
Summary
Object interaction
The clock example
Abstraction and modularization
Abstraction in software
Modularization in the clock example
Implementing in the clock display
Class diagrams versus object diagrams
Primitive types and objetc types
The ClockDisplay souce code
Objects creating objects
Multiple constructors
Method calls
Another example of object interaction
Using a debugger
Method calling revisited
Summary
Grouping objects
Grouping objects in flexible-size collections
A personal notebook
A first look at library classes
Object structures with collections
Numbering within collections
Removing an item from a collection
Processing a whole collection
Summary of the notebook example
Another example: an auction system
Fixed-size collections
Summary
More sophisticated behavior
Documentation for library classes
The TechSupport system
Reading class documentation
Adding random behavior
Packages and import
Using maps for associations
Using sets
Tokenizing strings
Finishing the TechSupport system
Writing class documentation
Public versus private
Learning about classes from their interfaces
Class variables and constants
Summary
Well-behaved objects
Testing and debugging
Unit testing within BlueJ
Test automation
Modularization and interfaces
A debugging scenario
Commenting and style
Manual walkthroughs
Print statements
Debuggers
Putting the techniques into practice
Summary
Designing classes
Introduction
The world-of-zuul game example
Introduction to coupling and cohesion
Code duplication
Making extensions
Coupling
Responsibility-driven design
Localizing change
Implicit coupling
Thinking ahead
Cohesion
Refactoring
Design guidelines
Executing without BlueJ
Summary
Improving structure with inheritance
The DoME example
Using Inheritance
Inheritance hierarchies
Inheritance in Java
DoME: adding other item types
Advantages of inheritance (so far)
Subtyping
The Object class
Polymorphic collections
The collection hierarchy
Summary
More about inheritance
The problem: DoME's print method
Static type and dynamic type
Overriding
Dynamic method lookup
Super call in methods
Method polymorphism
Object methods: toString
Protected access
Another example of inheritance with overriding
Summary
Further abstraction techniques
Simulations
The foxes-and-rabbits simulation
Abstract classes
© Mir Farooq Ali 2003.