CS141: Topics for Nov 11, 13, & 15, 2013
Please look at Study Page. We will review on Wednesday.
Homework and Reading
The reading and homework for this week can be found here: Lab 12
Continue discussion of chapter 9 from last week.
In particular: What is the difference between a class, an abstract class, and an interface?
- Class: Can contain data and methods. All methods must be implemented.
- Abstract Class: Can contain data and methods. Not all methods are implemented. The methods that aren't,
are called abstract and at some point must be implemented in a concrete subclass.
- Interface: Contains no data (except perhaps constants). None of the methods are implemented.
- A class "implements" an interface. A subclass "extends" a superclass.
- A class can have only one superclass but can implement multiple interfaces.
- An object cannot be created from an abstract class or interface. An object can only
be created from a concrete class.