007-004-010
Aggregation with Multiple Objects
Hard
Problem Description
Aggregation with Multiple Objects
In this problem, you will define Team and Member classes that demonstrate aggregation, where one object holds multiple related objects.
Learning Objective: Understand aggregation where one object holds multiple other objects
Overview
Implement a structure where Team class holds multiple Member objects in an array.
Specifications
Memberclass has aString namefieldTeamclass has aString teamNamefield and aMember[]typedmembersfield- All fields use package-private access (no modifier)
Testing
Automated tests will create Team and Member instances, then verify field access and aggregation structure.
Ready to Try Running Code?
Log in to access the code editor and execute your solutions for this problem.
Don't have an account?
Sign Up