Java Interfaces and UML
Implement the following class hierarchy on paper. You do not need to fill in the method bodies or include comments.
Answer the following questions:
- How are abstract classes and interfaces the same?
- How are abstract classes and interfaces different?
- Fill in the following table with one of three values.
- Yes - An object of the indicated type could be stored in a variable of the indicated type.
- No - An object of the indicated type could not be stored in a variable of the indicated type.
- Nonsense - It is not possible to instantiate an object of the indicated type.
| Variable Type |
Throwable | Ball | Rock | Baseball | Football |
Object Type | Throwable | | | | | |
Ball | | | | | |
Rock | | | | | |
Baseball | | | | | |
Football | | | | | |