7OCT18: Created page to build out the activity associated with the choosing of a class in java.util on which to build a project surrounding its inheritance hierarchy.
4-MAR-19: Updated to reflect interest in LinkedLists and ArrayLists only for Spring 2019
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.
bookModule resources & links
wb_incandescentProposed project phases
- 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
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
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.
Demonstrate foundational competence related to Java's inheritance mechanisms and practice the skill of learning a Class through the API documentation alone.
Study the API
Study 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!
Look up your class in the Liang 9's chapter 22. TYpe in any relevant sample programs and get them running.
Research examples of use
Search Stack Overflow for instances in which somebody else has used your class. Make a note
Diagram the classes
Using 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.
Build 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.
Design 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.
Design 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.
Your program should carry out the following general tasks which you shall implement using code that harnesses the power of your chosen class.
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.