Color Scheme
Key Concept
Corresponding Diagram
In-Class Discussion
In-Class Activity
Details in the Textbook
Object-Oriented Design
Goals: robustness, adaptability, reusability
Principles: abstract, encapsulation, modularity
Terms: polymorphism, inheritance, encapsulation
Any questions about these key points?
Language constructs support these principles
See Figure 2.3 for a complex inheritance hierarchy
See Figure 2.4 for a simple inheritance hierarchy
See Figure 2.5 for another inheritance hierarchy
What is a numerical progression?
Interfaces and abstract classes
Establish a contract for an implementation
Defer implementation to another class
Write a Java program that divides a variable by zero!
How to Handle?
Do not handle the exception
Handle the exception where it occurs
Handle the exception somewhere else in the program
What are the trade-offs of these solutions?
How are exception types similar and different?
Why are generics important?
Let's investigate a method signature!
public static <T> void reverse(T[] data)
Why are nested classes important?
Intuitively, a class within a class
Any questions about object-oriented design?