Inheritance hierarchies and the Java API
This module guides students through an inheritance focused journey into the bowels of a single class in the Java library. A visual depiction of the class's family will accompany a sample program demonstrating its juiciest bits.
Contents
check_boxLearning Objectives
bookModule resources & links
wb_incandescentProject specifications
wb_incandescentProposed project phases
wb_incandescentSharing guide
check_boxLearning Objectives
- Trace the lineage (family origin) of all methods and member variables in a java.util package class using graphic representations
- Master reading the Java API documentation by using nothing but the doc to make calls and usefully process the result of calls to methods on the chosen class
- Create an object-relationship diagram depicting the components involved in the sample program
bookExternal Resources
java.util classes in the Java 8 API Documentation
Oracle's online Java tutorials on Inheritance and Interfaces
draw.io google docs extension for diagramming all manner of things, including Java classes
bookProject specification
Coding to a specification creates creative/engineering bounds that do a brain good when learning a skill. Study these specs, write your code to meet its criteria, and test ruthlessly. You may renegotiate the specs at any time with the help of your fearless instructor.
objective |
Demonstrate foundational competence related to Java's inheritance mechanisms and practice the skill of learning a Class through the API documentation alone. |
planning |
Study the APIStudy the API documentation for your chosen Collections class fiercely by diagramming the class itself, including all important methods and member variables. Dissect the class hierarchy located at the to of the Class API page and the section titled All Implemented Interfaces. Create a draft class inheritance chart as you read. We're going to draft this! Research examplesLook up your class in the Liang 9's chapter 22. TYpe in any relevant sample programs and get them running. Research examples of useSearch Stack Overflow for instances in which somebody else has used your class. Make a note Diagram the classesUsing the Wikipedia page on class diagramming as a guide, create a final draft of your class diagram. Make it big and interesting enough that we can post it on the wall for others to reference in the future. |
program structure |
Setup NetBeansBuild this entire project in its own NetBeans package, such that after you push this directory to GitHub, others can grab the whole configuration settings and test your program directly. Blueprint classDesign a class without a main method that cleverly builds a tool around the functions of your chosen class. Remember, you're creating a class that will be instantiated by a client class. (e.g. we instantiated Donut objects in our client class DonutLand.). Name this class appropriately. Test ruthlesslyDesign a client class that contains a main method which immediately delegates to another method the responsibility for testing your Object instantiating your class and showing off its nifty methods. |
functionality |
Your program should carry out the following general tasks which you shall implement using code that harnesses the power of your chosen class.
|
deliverable checklist |
The value of your work is related to how easily others can learn from it in the future. As such, take your time in satisfying each of these sharing guidelines.
|
Page created in 2018 and can be freely reproduced according to the site's copyleft use agreement.