Object Oriented Programming: Polymorphism
Class Automobile
- must be an abstract class
- must implement interface
Descriptable
- must implement interface
Traceable
- must track number of created instances starting from 100
- parameterless constructor must increase number of instances by one
Class Car
- must extend class
Automobile
- getDescription must return Description that contains name attribute equal to "Car"
Class Truck
- must extend class
Automobile
- getDescription must return Description that contains name attribute equal to "Truck"
Class Inventory
- must implement only one method
add
- must not contain the same automobile more than once
- must implement method
stockSize
covering cars and trucks in an inventory
- must implement method
identifiers
returning identifiers of all automobiles in an inventory