Question: In this part, you will develop code for the SwimMeet class. A swim meet has a name and several meet events into which swimmers are
In this part, you will develop code for the SwimMeet class. A swim meet has a name and several meet events into which swimmers are entered. The person organizing the meet will need to add events and get results about the meet to send to Coaches. Results could include a list and count of swimmers qualifying for the state championship by event, and a list of event winners.
Instance variables and constructor for the SwimMeet class
Complete the Swimmeet class so that it
a has a name and a list of Meet Event objects
b has a oneparameter constructor that initializes the name of the swim meet via a parameter and instantiates the ArrayList. The name cannot be null or empty.
c has getters for both the name and the list.
The constructor should have a test class named TestSwimMeetConstructor for the following cases:
a any and all precondition checks
b successfully creating a SwimMeet with a name and empty list
Adding MeetEvent objects to a SwimMeet
Create a SwimMeet : : addEvent method that adds a Meet Event object to the meet and returns true if successful.
a it is illegal to add a null MeetEvent
b attempting to add a duplicate MeetEvent will be unsuccessful but not illegal A duplicate MeetEvent would have the same name and event number as a MeetEvent already in the list.
Your SwimMeet : : addEvent method must handle the following test cases:
a any and all precondition checks
b adding a MeetEvent with a name and event number that duplicates a MeetEvent already added to the meet.
Page of
c adding a single MeetEvent
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
