Description:
The system should allow practicing core Java concepts by modeling simple classes, creating objects, managing lists of elements, applying inheritance and polymorphism, and using maps to store and count data. Students will build small examples where they define classes, instantiate objects, store them in an ArrayList, use a HashMap for quick lookups and counters, and demonstrate polymorphism through inheritance.
Acceptance Criteria:
-
Scenario: Create and print objects Given a class with attributes and a constructor When I instantiate multiple objects Then I can print their values on the console.
-
Scenario: Manage a list of objects Given an
ArrayListwith several elements When I iterate through the list Then I can filter or display only the matching items. -
Scenario: Store key-value pairs Given a
HashMapinitialized in the program When I insert multiple key-value entries Then I can search by key and retrieve the corresponding value. -
Scenario: Demonstrate inheritance and polymorphism Given a parent class and two subclasses overriding a method When I add them to an
ArrayListof the parent type Then each object executes its own version of the method when called. -
Scenario: Count repeated elements Given a list with repeated words When I process them into a
HashMapThen the output shows each word with its correct frequency count.