Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create the following classes: 1. Club Holds the following information: a. club number clubs registration number b. name the name of the club c. address

Create the following classes: 1. Club Holds the following information: a. club number clubs registration number b. name the name of the club c. address address of the club (use structs) d. telephone number 10-digit phone number 2. Registrant Holds the following information: a. registration number identification number for a registrant b. name a registrants name c. date of birth d. address address of the registrant (use structs) e. telephone number 10-digit phone number 3. Swim meet Holds the following information: a. Start date start date of the meet b. End date end date of the meet c. Name of the meet represent a name of the meet d. Course pool type (SCM, SCY, LCM) (use enum) 4. Event Holds the following information: a. Distance distance of a swim (50, 100, 200, 400, 800, 1500) (use enum) b. Stroke code for the stroke (butterfly, backstroke, breaststroke, freestyle, individual medley) (use enum) 5. Swim Holds the following information: a. Time swam final time of a swim (example: 1:05.52) b. Heat number of the heat c. Lane number of the lane Implement all 5 classes and provide the following: 1. Appropriate fields 2. Appropriate properties for the fields 3. Appropriate constructors (a minimum of 1 in addition to the default constructor) 4. Method GetInfo() that returns a string with the information contained within the fields of an instance 5. A registration number for swimmers must be unique 6. A registration number for clubs must be unique 7. You can add any additional methods that may be needed. 8. In the main() method, test that all the class members work correctly. User input is not needed - use the hard coded values. After doing all this here are the further questions. 1. add a method addswimmer to club class so a registrant can be added to the club members. if the registrant is already assigned to a different club, this method should throw an exception with a massage: swimmer already assigned to {club name} club. also, make sure that registrants club information is correct. assume that it will be no more than 20 club members in any club. 2. Add Club property to the Registrants class to represent a registrants club affiliation. User of this class can add club affiliation to a registrant by assigning the reference of a Club object to this property. Make sure that a registrant is also added to the club member list. 3. Add new field, noOfLanes, and corresponding property to a SwimMeet class to keep the information about number of lanes in the pool. Change your constructors as required. 4. Make necessary changes to SwimMeet class to ensure that pool size cannot be changed after it is initialized. 5. Add a method AddEvent to SwimMeet class that will add an event to the swim meet. Assume that there will be no more than 50 events at a meet. 6. Prior to the beginning of the swim event swimmers will enter the event. Each event consists of a number of heats. Each heat represents a number of swimmers racing at the same time. The process of assigning swimmers to heats and lanes where they are going to race is known as seeding. At the end of each heat each swimmer gets the time that they swam the race. You need to modify you Event class to keep information about the registrants that swim that event. There will be no more than 100 swimmers per any event. Create a method AddSwimer that will add a registrant(swimmer) to the event. If swimmer is added twice to the same event throw an Exception with message Swimmer {name of the swimmer, reg number} is already entered Each swimmer that is added to an event will have a corresponding swim. (Hint: You can use parallel arrays to accomplish this.) 7. When a meet is created and all the swimmers are registered for the events, the swim meet is seeded. Seeding a swim meet means seeding each event. The way the real meets are seeded is rather complicated to implement in this assignment, so we will assign heats and lanes in order. For example, in a pool with 8 lanes the first 8 swimmers are assigned lanes 1 to 8 in heat 1, the next 8 swimmers are assigned lanes 1-8 in heat 2, and so on. Please note that not all swim meets are held in a pool with 8 lanes. Add method Seed to SwimMeet class that will call the Seed method of each event. Seed method in Event class will assign heats and lanes in corresponding Swim object for a swimmer. 8. Add EnterSwimmerTime method to the Event class. This method will accept two parameters: a swimmer and the time that the swimmer swam. The method will update appropriate information in the Swim object.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Video Basics

Authors: Herbert Zettl

8th Edition

1305950860, 978-1305950863

Students also viewed these Databases questions