Abstract Data Type & Java Interface
After reading this chapter and engaging in the embedded activities and reflections, you should be able to:
- Criticize design decisions for a simple type hierarchy in Java made by employing inheritance mechanism.
- Recognize the usefulness of abstract classes and abstract methods to provide code reuse as well as a common interface among subtypes.
- Identify the syntax of Java Abstract Classes and contrast it with the syntax of Java Interfaces.
- Contrast the utility of abstract classes and interfaces.
- Catalogue class relationships into is-a and has-a classes and further separate is-a relationships into "extends" and "implements" types.
- Distinguish between interfaces and implementations.
- Define what is an Abstract Data Type (ADT).
- Declare an ADT using a Java interface, with complete Javadoc comments.
- Understand the importance and use of pre- and post-conditions for methods documentation.
- Write pre- and post-conditions for a given method definition within the Javadoc framework.
Starter code for this chapter
Solution code
Solution code for this chapter.