Exercise W9 - Static and Class Relationship
Exercise W9 - Static and Class Relationship
Exercise W9 - Static and Class Relationship
2022390013
Object Oriented Programming
Problem 1
Write a Java class named ItemCounter that tracks the number of instances created from this
class. Within this class, include a public method called getItemCount() that returns the current
count of objects created from the ItemCounter class. Additionally, write another driver class
to verify the ItemCounter class.
Problem 2
Based on the simple class diagram below, write Java classes that correspond to the diagram.
Afterward, create a new driver class to test both classes using your name and fabricated/fake
addresses.
Address.java
ClubMember.java
Driver.java