You are creating application that is going to track the swim clubs, their swimmers, swim meets and results.
References: Please refer to “General Assignment Requirements” document posted on eCentennial.
Modify Assignment 2 to satisfy the following: Add classes with their members that is represented by following class diagram:
ClubsManager - clubs:Clubs - numberOfClubs : int + <<propertie>> Club: Club + <<property>> NumberOfClubs:int + <<constructor>> ClubsMaqnager() + Add(club: Club):void + GetClubByRegNumber(clubNumber : int):Club + LoadClubs(filename :string, delimeter:char):void + Save(fileName:string):void + Load(fileName:string):void
Explanation of the class and its members:
1. clubs is a field that contains a list of Clubs. Assume there will be no more than 100 clubs. Clubs is a corresponding property.
2. numberOfClubs is a field that contains a number of clubs in the Clubs list. NumberOfClubs is a corresponding property.
3. Add is a method that has one parameter that is reference to a Club object. The method has no return value. It adds the club to the clubs list if it does not exists.
4. GetClubByRegNumber retunes a Club that has registration number that is specified by the parameter. If a club is not found, it returns null.
COMP123-Programming II 6/7/2018
Assignment 2 Page 2 of 2
5. LoadClubs method loads and add all Clubs to the clubs field from a file specified by fileName parameter. The fields in a record are delimited by the string specified by delimiter parameter.
6. Clubs text file is comma delimited file with the following fields in order: 1. Registration number – mandatory field 2. Club name – mandatory field 3. Street address – optional field 4. City address – optional field 5. Province address – optional field 6. Postal code address – optional field 7. Phone number – mandatory field Make sure you handle invalid records using exceptions.
7. Save method saves all the clubs in the clubs field and related registrants to a binary file specified as a parameter to the method.
8. Load method loads all the clubs and related registrants to the application from the file that is specified as parameter to the method.
Additional requirements: 1. The test harness is provided in attached program.txt file. You must not modify the content of the class. You can change namespace names only. 2. Modify your code from assignment 2A to provide the similar output as in the text file output.txt 3. The text files (Clubs.txt) that is provided contain the clubs that need to be loaded. 4. You can add any additional code that may be needed.
Submission: Submit the solution to Assignment2 assignment box by the assignment box deadline.