Lesson 4: Object-Oriented Design
Outline:
- Questions?
- Quiz #1
- Kotlin constructors, revisited
- primary constructors and
initblock - default parameter values
- primary constructors and
- Inheritance
- parent and child classes (a.k.a. superclasses and subclasses)
- is-a versus has-a
- example: inheritance and method calls
- Wrap-up
What’s next
Upcoming assignments:
- Assignment 1 is due this Wednesday
- Assignment 2 will be released by Wednesday, and based primarily on Friday’s class
What you should do now:
- The readings (see below)
- Try out Exercise 2 from today
- Complete Parts B-D of Assignment 1
Reading assignment (to be completed by the next class):
Classes and inheritance (from today):
Inheritance and interfaces (for next time):