Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Assignment 3 Background: You are creating application that is going to track the swim clubs, their swimmers, swim meets and results. References: Please refer to

Assignment 3
Background:
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.
Part 3:
Now that you have the test project that test your methods in the library you can change the code in library to make it better. After the changes are made, all your test should be still passing for the methods that did not change the signature.
Here what changes you should make to the class library that you created in Assignment 2.
Create two new classes:Swimmer - Swimmer is a Registrant who have additional class members:
List of the best times for each event and course (SCY, SCM, LCM) (This may require changes to EnterSwimmerTime() method and Event class.
Coach that is being coached by.
Method GetBestTime that has 3 parameters: course, distance, and stroke. This method returns TimeSpantype that represents the best time for the swimmer.
Method AddAsBestTime that has 4 parameters: course, distance, stroke, and time. This method check if the given time (TimeSpan) is the best time and if it is it will save it as the best time for the course, the distance and the stroke specified.
Coach Coach is a Registrant who has additional class members:
Coaching credentials (string)
List of swimmers that are being coached by this coach
Add appropriate methods and/or properties that will allow swimmers to be assigned to a coach and vice versa.
Modify and add necessary class members to the class Club to keep track of swimmers and coaches in the club. Make sure that swimmer can only be assigned to a coach that is already assigned to the same club.
So far, we have used arrays when we needed a collection. Replace arrays with more appropriate collection and remove any number restrictions.
So far, we used GetInfo() method to display the information about the object. All of them should be changed to more appropriate ToString() method. Add additional ToString() methods to two new classes.
As you can see from the class diagram both of our managers have methods to add, save, get, load, and save the corresponding elements. To streamline the implementation of the managers, you need to change the name of these members. This may require change to some tests in the test project.
In both classes change the names as follows:
AddXxxxx() to Add()
GetXxxxx() to GetByRegNum()
LoadXxxxx() to Load()
SaveXxxxx() to Save()
NumberXxxx to Number
Extract the interface from the manager classes and call them IClubsRepository and ISwimmersRepository.Interfaces should contain the methods from point 6.
Additional requirements:
Make sure that all classes except Program class are in a class library.
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.
Modify your code from assignment 2 to provide the similar output as in the text file output.rtf
The two text files (Clubs.txt and Swimmers.txt) that are provided contain the clubs and swimmers that need to be loaded.
The two files that are generated by the application are also provided for the reference.
You can add any additional code that may be needed.
Submit the solution to Assignment3 drop box by drop box deadline.
CLUBSOUT
3004|Club 1|||||4164444444
3005|Club 2|35 River St|Toronto|ON|M2M 5M5|4165555555
3006|ACME|400 River St|London|ON|L2M 5M5|4166666666
3007|Club 7|400 River St|London|ON|L2M 5M5|4167777777
4|NYAC|||||4164444444
5|CCAC|35 River St|Toronto|ON|M2M 5M5|4165555555
PROGRAM
namespace ConsoleSwim123
{
class Program
{
static void Main(string[] args)
{
IClubsRepository clbMngr = new ClubsManager();
ISwimmersRepository swmMngr = new SwimmersManager((ClubsManager)clbMngr);
try
{
clbMngr.Load(@"C:A2Clubs.txt", ",");
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
for (int i = 0; i
{
DisplayInfo(i.ToString(), ((ClubsManager)clbMngr).Clubs[i] );
}
swmMngr.Load(@"C:A2Swimmers.txt", ",");
for (int i = 0; i
{
DisplayInfo(i.ToString(), ((SwimmersManager)swmMngr).Swimmers[i] );
}
// Create 3 swimmers
Swimmer swimmer1;
Swimmer swimmer2;
Swimmer swimmer3;
CreateSwimmers(out swimmer1, out swimmer2, out swimmer3);
//Create two clubs
Club club1;
Club club2;
CreateClubs(out club1, out club2);
//Assigne swimmers to club
AssigneSwimmersToClubs(swimmer1, swimmer2, swimmer3, club1, club2);
//New code
Coach coach1;
Coach coach2;
CreateCoaches(out coach1, out coach2);
AssignCoachesAndSwimmers(coach1, coach2, swimmer1, swimmer2, swimmer3);
//Create swim meets
SwimMeet meet1;
SwimMeet meet2;
CreateSwimMeets(out meet1, out meet2);
Event _50free1;
Event _100fly;
Event _200breast;
Event _400free;
Event _1500free;
Event _1500free2;
CreateEvents(out _50free1, out _100fly, out _200breast, out _400free, out _1500free, out _1500free2);
AddEventsToSwimMeets(meet1, meet2, _50free1, _100fly, _200breast, _400free, _1500free, _1500free2);
AddSwimmersToEvents(swimmer1, swimmer2, swimmer3, meet1, meet2,
_50free1, _100fly, _200breast, _400free, _1500free, _1500free2);
SeedMeets(meet1, meet2);
EnterTimesForSwims(swimmer1, swimmer2, swimmer3, meet1, meet2,
_50free1, _100fly, _200breast, _400free, _1500free, _1500free2);
Console.WriteLine("Best time for SCM 1500 free for swimmer 1 is: {0}", swimmer1.GetBestTime(PoolType.SCM, Stroke.Freestyle,EventDistance._1500).ToString(@"mm:ss.ff"));
Console.WriteLine("Best time for SCM 1500 free for swimmer 1 is: {0}", swimmer3.GetBestTime(PoolType.SCM, Stroke.Freestyle, EventDistance._1500).ToString(@"mm:ss.ff"));
clbMngr.Add(club1);
swmMngr.Add(swimmer1);
swmMngr.Add(swimmer2);
swmMngr.Add(swimmer3);
clbMngr.Save("ClubsOut.txt", "|");
swmMngr.Save("SwimmersOut.txt", "|");
}
private static void AssignCoachesAndSwimmers(Coach coach1, Coach coach2, Swimmer swimmer1, Swimmer swimmer2, Swimmer swimmer3)
{
//coach not registered with the club
try
{
swimmer1.Coach = coach1;
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
//Coach is not assigned to a club
try
{
coach2.AddSwimmer(swimmer2);
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
swimmer1.Club.AddCoach(coach1);
swimmer2.Club.AddCoach(coach2);
//swimmer and the coach not in the same club
try
{
coach2.AddSwimmer(swimmer3);
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
coach1.AddSwimmer(swimmer1);
coach1.AddSwimmer(swimmer3);
swimmer2.Coach = coach2;
DisplayInfo("coach 1", coach1);
DisplayInfo("coach 2", coach2);
DisplayInfo("club1", swimmer1.Club);
DisplayInfo("club2", swimmer2.Club);
}
private static void CreateCoaches(out Coach coach1, out Coach coach2)
{
coach1 = new Coach("John Wisemiler", new DateTime(1950, 1, 1),
new Address("35 Elm St", "Toronto", "ON", "M2M 2M2"), 4161234567);
DisplayInfo("coach1", coach1);
coach2 = new Coach("Micael Phelps", new DateTime(1975, 6, 30),
new Address("5 Queen St", "Boston", "ON", "234567"), 3123123333);
coach2.Credentials = "NNCA Level 1";
DisplayInfo("coach2", coach2);
}
private static void EnterTimesForSwims(Registrant swimmer1, Registrant swimmer2, Registrant swimmer3, SwimMeet meet1, SwimMeet meet2, Event _50free1, Event _100fly, Event _200breast, Event _400free, Event _1500free, Event _1500free2)
{
Console.WriteLine("********** Adding swim times for swimmers *********");
_50free1.EnterSwimmersTime(swimmer1, "00:30.13");
_50free1.EnterSwimmersTime(swimmer2, "00:28.87");
_50free1.EnterSwimmersTime(swimmer3, "00:29.54");
_100fly.EnterSwimmersTime(swimmer1, "01:17.23");
_100fly.EnterSwimmersTime(swimmer2, "01:05.16");
_200breast.EnterSwimmersTime(swimmer1, "02:25.23");
_200breast.EnterSwimmersTime(swimmer3, "02:17.03");
_400free.EnterSwimmersTime(swimmer2, "04:55.23");
_1500free.EnterSwimmersTime(swimmer1, "15:17.23");
_1500free.EnterSwimmersTime(swimmer2, "16:17.23");
_1500free.EnterSwimmersTime(swimmer3, "17:17.23");
_1500free2.EnterSwimmersTime(swimmer1, "15:16.23");
_1500free2.EnterSwimmersTime(swimmer3, "17:18.23");
try
{
_400free.EnterSwimmersTime(swimmer1, "04:55.23");
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
DisplayInfo("meet1", meet1 );
DisplayInfo("meet2", meet2 );
}
private static void SeedMeets(SwimMeet meet1, SwimMeet meet2)
{
meet1.Seed();
meet2.Seed();
DisplayInfo("meet1", meet1 );
DisplayInfo("meet2", meet2 );
}
private static void AddSwimmersToEvents(Registrant swimmer1, Registrant swimmer2, Registrant swimmer3, SwimMeet meet1, SwimMeet meet2, Event _50free1, Event _100fly, Event _200breast, Event _400free, Event _1500free, Event _1500free2)
{
//Add swimmers to event
_50free1.AddSwimmer(swimmer1);
_50free1.AddSwimmer(swimmer2);
_50free1.AddSwimmer(swimmer3);
try
{
_50free1.AddSwimmer(swimmer3);
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
_100fly.AddSwimmer(swimmer1);
_100fly.AddSwimmer(swimmer2);
_200breast.AddSwimmer(swimmer1);
_200breast.AddSwimmer(swimmer2);
_200breast.AddSwimmer(swimmer3);
_400free.AddSwimmer(swimmer2);
_1500free.AddSwimmer(swimmer1);
_1500free.AddSwimmer(swimmer2);
_1500free.AddSwimmer(swimmer3);
_1500free2.AddSwimmer(swimmer1);
_1500free2.AddSwimmer(swimmer3);
DisplayInfo("meet1", meet1 );
DisplayInfo("meet2", meet2 );
}
private static void AddEventsToSwimMeets(SwimMeet meet1, SwimMeet meet2, Event _50free1, Event _100fly, Event _200breast, Event _400free, Event _1500free, Event _1500free2)
{
meet1.AddEvent(_50free1);
meet1.AddEvent(_100fly);
meet1.AddEvent(_200breast);
meet1.AddEvent(_1500free2);
meet2.AddEvent(_400free);
meet2.AddEvent(_1500free);
DisplayInfo("meet1", meet1 );
DisplayInfo("meet2", meet2 );
}
private static void CreateEvents(out Event _50free1, out Event _100fly, out Event _200breast, out Event _400free, out Event _1500free, out Event _1500free2)
{
_50free1 = new Event();
_50free1.Distance = EventDistance._50;
_50free1.Stroke = Stroke.Freestyle;
_100fly = new Event(EventDistance._100, Stroke.Butterfly);
_200breast = new Event(EventDistance._200, Stroke.Breaststroke);
_400free = new Event(EventDistance._400, Stroke.Freestyle);
_1500free = new Event(EventDistance._1500, Stroke.Freestyle);
_1500free2 = new Event(EventDistance._1500, Stroke.Freestyle);
}
private static void CreateSwimMeets(out SwimMeet meet1, out SwimMeet meet2)
{
Console.WriteLine("*******meets and events ****** ***********************************");
meet1 = new SwimMeet();
meet1.Name = "Winnter Splash";
meet1.StartDate = new DateTime(2017, 1, 10);
meet1.EndDate = new DateTime(2017, 1, 12);
DisplayInfo("meet1", meet1 );
meet2 = new SwimMeet("Spring Splash", new DateTime(2017, 5, 21), new DateTime(2017, 5, 21), PoolType.SCM, 2);
DisplayInfo("meet2", meet2 );
}
private static void AssigneSwimmersToClubs(Registrant swimmer1, Registrant swimmer2, Registrant swimmer3, Club club1, Club club2)
{
Console.WriteLine("*******Adding swimmers to clubs ****** ***********************************");
club1.AddSwimmer(swimmer1);
DisplayInfo("club1", club1 );
DisplayInfo("swimmer1", swimmer1 );
club2.AddSwimmer(swimmer2);
DisplayInfo("club2", club2 );
DisplayInfo("swimmer2", swimmer2 );
try
{
swimmer2.Club = club1;
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
try
{
swimmer3.Club = club1;
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
DisplayInfo("swimmer3", swimmer3 );
DisplayInfo("club1", club1 );
}
private static void CreateClubs(out Club club1, out Club club2)
{
club1 = new Club();
club1.PhoneNumber = 4164444444;
club1.Name = "NYAC";
DisplayInfo("club1", club1 );
club2 = new Club("CCAC", new Address("35 River St", "Toronto", "ON", "M2M 5M5"), 4165555555);
DisplayInfo("club2", club2 );
}
private static void CreateSwimmers(out Swimmer swimmer1, out Swimmer swimmer2, out Swimmer swimmer3)
{
swimmer1 = new Swimmer("Bob Smith", new DateTime(1970, 1, 1),
new Address("35 Elm St", "Toronto", "ON", "M2M 2M2"), 4161234567);
DisplayInfo("swimmer1", swimmer1 );
swimmer2 = new Swimmer();
DisplayInfo("swimmer2", swimmer2 );
swimmer2.Address = new Address("1 King St", "Toronto", "ON", "M2M 3M3");
swimmer2.Name = "John Lee";
swimmer2.PhoneNumber = 4162222222;
swimmer2.DateOfBirth = new DateTime(1950, 12, 1);
DisplayInfo("swimmer2", swimmer2 );
swimmer3 = new Swimmer("Ann Smith", new DateTime(1975, 1, 1),
new Address("5 Queen St", "Toronto", "ON", "M2M 4M4"), 4163333333);
DisplayInfo("swimmer3", swimmer3 );
}
public static void DisplayInfo (string firstLineMessage, object info)
{
Console.WriteLine("--{0}---------------------", firstLineMessage);
Console.WriteLine(info);
Console.WriteLine("-------------------------- ");
}
}
}
SWIMMERSOUT
3004|Swimmer 4|1974-04-04 12:00:00 AM|4 Queen St|Toronto|ON|M4M 4M4|4163333330|3005
3005|Swimmer 5|1975-05-05 12:00:00 AM|5 Queen St|Toronto|ON|M5M 4M4|4163333331|3006
3006|Swimmer 6|1976-06-06 12:00:00 AM|6 Queen St|Toronto|ON|M6M 4M4|4163333332|3006
3007|Swimmer 7|1977-07-07 12:00:00 AM|7 Queen St|Toronto|ON|M7M 4M4|4163333333|3007
3008|Swimmer 8|1978-08-08 12:00:00 AM|8 Queen St|Toronto|ON|M8M 4M4|4163333334|3007
3009|Swimmer 9|1979-09-09 12:00:00 AM|9 Queen St|Toronto|ON|M9M 4M4|4167777775|
3010|Swimmer 10|1970-01-01 12:00:00 AM|5 Queen St|Toronto|ON|M2M 4M4|416333330|
3011|Swimmer 11|1971-03-03 12:00:00 AM|||||4163333331|
3012|Swimmer 12|1970-01-12 12:00:00 AM|12 Queen St|Toronto|ON|M2M 4M4|416333312|3005
1|Bob Smith|1970-01-01 12:00:00 AM|35 Elm St|Toronto|ON|M2M 2M2|4161234567|4
2|John Lee|1950-12-01 12:00:00 AM|1 King St|Toronto|ON|M2M 3M3|4162222222|5
3|Ann Smith|1975-01-01 12:00:00 AM|5 Queen St|Toronto|ON|M2M 4M4|4163333333|4
************Clubs**************
3004,Club 1,,,,,4164444444
3005,Club 2,35 River St,Toronto,ON,M2M 5M5,4165555555
3006,ACME,400 River St,London,ON,L2M 5M5,4166666666
3006,Duplicate number,400 Sae St,Halifax,NS,P2M 5M5,4167777777
,Wrong Nuber,400 River St,London,ON,L2M 5M5,4166666666
3007,Club 7,400 River St,London,ON,L2M 5M5,4167777777
3008,Wrong Phone,400 River St,London,ON,L2M 5M5,asdr
*****************Swimmers***********
3004,Swimmer 4,1974-04-04 12:00:00 AM,4 Queen St,Toronto,ON,M4M 4M4,4163333330,3005
3005,Swimmer 5,1975-05-05 12:00:00 AM,5 Queen St,Toronto,ON,M5M 4M4,4163333331,3006
3006,Swimmer 6,1976-06-06 12:00:00 AM,6 Queen St,Toronto,ON,M6M 4M4,4163333332,3006
3007,Swimmer 7,1977-07-07 12:00:00 AM,7 Queen St,Toronto,ON,M7M 4M4,4163333333,3007
3008,Swimmer 8,1978-08-08 12:00:00 AM,8 Queen St,Toronto,ON,M8M 4M4,4163333334,3007
3009,Swimmer 9,1979-09-09 12:00:00 AM,9 Queen St,Toronto,ON,M9M 4M4,4167777775,
3010,Swimmer 10,1970-01-01 12:00:00 AM,5 Queen St,Toronto,ON,M2M 4M4,416333330,
3011,Swimmer 11,1971-03-03 12:00:00 AM,,,,,4163333331,
3013,,1972-01-01 12:00:00 AM,1 Queen St,Toronto,ON,M1M 4M4,4163333332,3004
3014,S wrong date,aw1973-02-02 12:00:00 AM,2 Queen St,Toronto,ON,M2M 4M4,4163333333,3004
3015,S wrong phone ,1974-03-03 12:00:00 AM,3 Queen St,Toronto,ON,M3M 4M4,xxx,3004
a16,S wrong reg number,1975-04-04 12:00:00 AM,4 Queen St,Toronto,ON,M4M 4M4,4163333335,3004
3012,Swimmer 12,1970-01-12 12:00:00 AM,12 Queen St,Toronto,ON,M2M 4M4,416333312,3005
3012,Swimmer 12,1970-01-12 12:00:00 AM,12 Queen St,Toronto,ON,M2M 4M4,416333312,3005
*****************************output************************
Invalid club record. Club with the registration number already exists:
?3006,Duplicate number,400 Sae St,Halifax,NS,P2M 5M5,4167777777
Invalid club record Club number is not valid:
?,Wrong Nuber,400 River St,London,ON,L2M 5M5,4166666666
Invalid club record. Phone number wrong format:
?3008,Wrong Phone,400 River St,London,ON,L2M 5M5,asdr
--0---------------------
Name: Club 1
Adress:
?
?
?
?
Phone: 4164444444
Reg number: 3004
Swimmers:
Coaches:
--------------------------
--1---------------------
Name: Club 2
Adress:
?35 River St
?Toronto
?ON
?M2M 5M5
Phone: 4165555555
Reg number: 3005
Swimmers:
Coaches:
--------------------------
--2---------------------
Name: ACME
Adress:
?400 River St
?London
?ON
?L2M 5M5
Phone: 4166666666
Reg number: 3006
Swimmers:
Coaches:
--------------------------
--3---------------------
Name: Club 7
Adress:
?400 River St
?London
?ON
?L2M 5M5
Phone: 4167777777
Reg number: 3007
Swimmers:
Coaches:
--------------------------
Invalid swimmer record. Invalid swimmer name:
?3013,,1972-01-01 12:00:00 AM,1 Queen St,Toronto,ON,M1M 4M4,4163333332,3004
Invalid swimmer record. Burth date is invalid:
?3014,S wrong date,aw1973-02-02 12:00:00 AM,2 Queen St,Toronto,ON,M2M 4M4,4163333333,3004
Invalid swimmer record. Phone number wrong format:
?3015,S wrong phone ,1974-03-03 12:00:00 AM,3 Queen St,Toronto,ON,M3M 4M4,xxx,3004
Invalid swimmer record. Invalid registration number:
?a16,S wrong reg number,1975-04-04 12:00:00 AM,4 Queen St,Toronto,ON,M4M 4M4,4163333335,3004
Invalid swimmer record. Swimmer with the registration number already exists:
?3012,Swimmer 12,1970-01-12 12:00:00 AM,12 Queen St,Toronto,ON,M2M 4M4,416333312,3005
--0---------------------
Name: Swimmer 4
Adress:
?4 Queen St
?Toronto
?ON
?M4M 4M4
Phone: 4163333330
DOB: 1974-04-04 12:00:00 AM
Reg number: 3004
Club: Club 2
--------------------------
--1---------------------
Name: Swimmer 5
Adress:
?5 Queen St
?Toronto
?ON
?M5M 4M4
Phone: 4163333331
DOB: 1975-05-05 12:00:00 AM
Reg number: 3005
Club: ACME
--------------------------
--2---------------------
Name: Swimmer 6
Adress:
?6 Queen St
?Toronto
?ON
?M6M 4M4
Phone: 4163333332
DOB: 1976-06-06 12:00:00 AM
Reg number: 3006
Club: ACME
--------------------------
--3---------------------
Name: Swimmer 7
Adress:
?7 Queen St
?Toronto
?ON
?M7M 4M4
Phone: 4163333333
DOB: 1977-07-07 12:00:00 AM
Reg number: 3007
Club: Club 7
--------------------------
--4---------------------
Name: Swimmer 8
Adress:
?8 Queen St
?Toronto
?ON
?M8M 4M4
Phone: 4163333334
DOB: 1978-08-08 12:00:00 AM
Reg number: 3008
Club: Club 7
--------------------------
--5---------------------
Name: Swimmer 9
Adress:
?9 Queen St
?Toronto
?ON
?M9M 4M4
Phone: 4167777775
DOB: 1979-09-09 12:00:00 AM
Reg number: 3009
Club: not assigned
--------------------------
--6---------------------
Name: Swimmer 10
Adress:
?5 Queen St
?Toronto
?ON
?M2M 4M4
Phone: 416333330
DOB: 1970-01-01 12:00:00 AM
Reg number: 3010
Club: not assigned
--------------------------
--7---------------------
Name: Swimmer 11
Adress:
?
?
?
?
Phone: 4163333331
DOB: 1971-03-03 12:00:00 AM
Reg number: 3011
Club: not assigned
--------------------------
--8---------------------
Name: Swimmer 12
Adress:
?12 Queen St
?Toronto
?ON
?M2M 4M4
Phone: 416333312
DOB: 1970-01-12 12:00:00 AM
Reg number: 3012
Club: Club 2
--------------------------
--swimmer1---------------------
Name: Bob Smith
Adress:
?35 Elm St
?Toronto
?ON
?M2M 2M2
Phone: 4161234567
DOB: 1970-01-01 12:00:00 AM
Reg number: 1
Club: not assigned
Coach: not assigned
--------------------------
--swimmer2---------------------
Name:
Adress:
?
?
?
?
Phone: 0
DOB: 0001-01-01 12:00:00 AM
Reg number: 2
Club: not assigned
Coach: not assigned
--------------------------
--swimmer2---------------------
Name: John Lee
Adress:
?1 King St
?Toronto
?ON
?M2M 3M3
Phone: 4162222222
DOB: 1950-12-01 12:00:00 AM
Reg number: 2
Club: not assigned
Coach: not assigned
--------------------------
--swimmer3---------------------
Name: Ann Smith
Adress:
?5 Queen St
?Toronto
?ON
?M2M 4M4
Phone: 4163333333
DOB: 1975-01-01 12:00:00 AM
Reg number: 3
Club: not assigned
Coach: not assigned
--------------------------
--club1---------------------
Name: NYAC
Adress:
?
?
?
?
Phone: 4164444444
Reg number: 4
Swimmers:
Coaches:
--------------------------
--club2---------------------
Name: CCAC
Adress:
?35 River St
?Toronto
?ON
?M2M 5M5
Phone: 4165555555
Reg number: 5
Swimmers:
Coaches:
--------------------------
*******Adding swimmers to clubs ******
***********************************
--club1---------------------
Name: NYAC
Adress:
?
?
?
?
Phone: 4164444444
Reg number: 4
Swimmers:
?Bob Smith
Coaches:
--------------------------
--swimmer1---------------------
Name: Bob Smith
Adress:
?35 Elm St
?Toronto
?ON
?M2M 2M2
Phone: 4161234567
DOB: 1970-01-01 12:00:00 AM
Reg number: 1
Club: NYAC
Coach: not assigned
--------------------------
--club2---------------------
Name: CCAC
Adress:
?35 River St
?Toronto
?ON
?M2M 5M5
Phone: 4165555555
Reg number: 5
Swimmers:
?John Lee
Coaches:
--------------------------
--swimmer2---------------------
Name: John Lee
Adress:
?1 King St
?Toronto
?ON
?M2M 3M3
Phone: 4162222222
DOB: 1950-12-01 12:00:00 AM
Reg number: 2
Club: CCAC
Coach: not assigned
--------------------------
Swimmer is registered with a different club
--swimmer3---------------------
Name: Ann Smith
Adress:
?5 Queen St
?Toronto
?ON
?M2M 4M4
Phone: 4163333333
DOB: 1975-01-01 12:00:00 AM
Reg number: 3
Club: NYAC
Coach: not assigned
--------------------------
--club1---------------------
Name: NYAC
Adress:
?
?
?
?
Phone: 4164444444
Reg number: 4
Swimmers:
?Bob Smith
?Ann Smith
Coaches:
--------------------------
--coach1---------------------
Name: John Wisemiler
Adress:
?35 Elm St
?Toronto
?ON
?M2M 2M2
Phone: 4161234567
DOB: 1950-01-01 12:00:00 AM
Reg number: 6
Club: not assigned
Credentials:
Swimmers
--------------------------
--coach2---------------------
Name: Micael Phelps
Adress:
?5 Queen St
?Boston
?ON
?234567
Phone: 3123123333
DOB: 1975-06-30 12:00:00 AM
Reg number: 7
Club: not assigned
Credentials: NNCA Level 1
Swimmers
--------------------------
Coach is not assigned to the club
Coach is not assigned to a club
Coach and swimmer are not in the same club
--coach 1---------------------
Name: John Wisemiler
Adress:
?35 Elm St
?Toronto
?ON
?M2M 2M2
Phone: 4161234567
DOB: 1950-01-01 12:00:00 AM
Reg number: 6
Club: NYAC
Credentials:
Swimmers
?Bob Smith
?Ann Smith
--------------------------
--coach 2---------------------
Name: Micael Phelps
Adress:
?5 Queen St
?Boston
?ON
?234567
Phone: 3123123333
DOB: 1975-06-30 12:00:00 AM
Reg number: 7
Club: CCAC
Credentials: NNCA Level 1
Swimmers
?John Lee
--------------------------
--club1---------------------
Name: NYAC
Adress:
?
?
?
?
Phone: 4164444444
Reg number: 4
Swimmers:
?Bob Smith
?Ann Smith
Coaches:
?John Wisemiler
--------------------------
--club2---------------------
Name: CCAC
Adress:
?35 River St
?Toronto
?ON
?M2M 5M5
Phone: 4165555555
Reg number: 5
Swimmers:
?John Lee
Coaches:
?Micael Phelps
--------------------------
*******meets and events ******
***********************************
--meet1---------------------
Sweem meet name: Winnter Splash
From-to: 2017-01-10 to 2017-01-12
Pool type: SCM
No lanes: 8
Events:
--------------------------
--meet2---------------------
Sweem meet name: Spring Splash
From-to: 2017-05-21 to 2017-05-21
Pool type: SCM
No lanes: 2
Events:
--------------------------
--meet1---------------------
Sweem meet name: Winnter Splash
From-to: 2017-01-10 to 2017-01-12
Pool type: SCM
No lanes: 8
Events:
?_50 Freestyle
?Swimmers:
?_100 Butterfly
?Swimmers:
?_200 Breaststroke
?Swimmers:
?_1500 Freestyle
?Swimmers:
--------------------------
--meet2---------------------
Sweem meet name: Spring Splash
From-to: 2017-05-21 to 2017-05-21
Pool type: SCM
No lanes: 2
Events:
?_400 Freestyle
?Swimmers:
?_1500 Freestyle
?Swimmers:
--------------------------
Swimmer Ann Smith,3 is already entered
--meet1---------------------
Sweem meet name: Winnter Splash
From-to: 2017-01-10 to 2017-01-12
Pool type: SCM
No lanes: 8
Events:
?_50 Freestyle
?Swimmers:
?Bob Smith
??Not seededo swim
?John Lee
??Not seededo swim
?Ann Smith
??Not seededo swim
?_100 Butterfly
?Swimmers:
?Bob Smith
??Not seededo swim
?John Lee
??Not seededo swim
?_200 Breaststroke
?Swimmers:
?Bob Smith
??Not seededo swim
?John Lee
??Not seededo swim
?Ann Smith
??Not seededo swim
?_1500 Freestyle
?Swimmers:
?Bob Smith
??Not seededo swim
?Ann Smith
??Not seededo swim
--------------------------
--meet2---------------------
Sweem meet name: Spring Splash
From-to: 2017-05-21 to 2017-05-21
Pool type: SCM
No lanes: 2
Events:
?_400 Freestyle
?Swimmers:
?John Lee
??Not seededo swim
?_1500 Freestyle
?Swimmers:
?Bob Smith
??Not seededo swim
?John Lee
??Not seededo swim
?Ann Smith
??Not seededo swim
--------------------------
--meet1---------------------
Sweem meet name: Winnter Splash
From-to: 2017-01-10 to 2017-01-12
Pool type: SCM
No lanes: 8
Events:
?_50 Freestyle
?Swimmers:
?Bob Smithn??H1L1 time: no time
?John Leen??H1L2 time: no time
?Ann Smithn??H1L3 time: no time
?_100 Butterfly
?Swimmers:
?Bob Smithn??H1L1 time: no time
?John Leen??H1L2 time: no time
?_200 Breaststroke
?Swimmers:
?Bob Smithn??H1L1 time: no time
?John Leen??H1L2 time: no time
?Ann Smithn??H1L3 time: no time
?_1500 Freestyle
?Swimmers:
?Bob Smithn??H1L1 time: no time
?Ann Smithn??H1L2 time: no time
--------------------------
--meet2---------------------
Sweem meet name: Spring Splash
From-to: 2017-05-21 to 2017-05-21
Pool type: SCM
No lanes: 2
Events:
?_400 Freestyle
?Swimmers:
?John Leen??H1L1 time: no time
?_1500 Freestyle
?Swimmers:
?Bob Smithn??H1L1 time: no time
?John Leen??H1L2 time: no time
?Ann Smithn??H2L1 time: no time
--------------------------
********** Adding swim times for swimmers *********
Swimmer has not entered event
--meet1---------------------
Sweem meet name: Winnter Splash
From-to: 2017-01-10 to 2017-01-12
Pool type: SCM
No lanes: 8
Events:
?_50 Freestyle
?Swimmers:
?Bob Smithn??H1L1 time: 00:30.13
?John Leen??H1L2 time: 00:28.87
?Ann Smithn??H1L3 time: 00:29.54
?_100 Butterfly
?Swimmers:
?Bob Smithn??H1L1 time: 01:17.23
?John Leen??H1L2 time: 01:05.16
?_200 Breaststroke
?Swimmers:
?Bob Smithn??H1L1 time: 02:25.23
?John Leen??H1L2 time: no time
?Ann Smithn??H1L3 time: 02:17.03
?_1500 Freestyle
?Swimmers:
?Bob Smithn??H1L1 time: 15:16.23
?Ann Smithn??H1L2 time: 17:18.23
--------------------------
--meet2---------------------
Sweem meet name: Spring Splash
From-to: 2017-05-21 to 2017-05-21
Pool type: SCM
No lanes: 2
Events:
?_400 Freestyle
?Swimmers:
?John Leen??H1L1 time: 04:55.23
?_1500 Freestyle
?Swimmers:
?Bob Smithn??H1L1 time: 15:17.23?
?John Leen??H1L2 time: 16:17.23
?Ann Smithn??H2L1 time: 17:17.23
--------------------------
Best time for SCM 1500 free for swimmer 1 is: 15:16.23
Best time for SCM 1500 free for swimmer 1 is: 17:17.23
image text in transcribed
image text in transcribed

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

Introduction To Database And Knowledge Base Systems

Authors: S Krishna

1st Edition

9810206208, 978-9810206208

More Books

Students also viewed these Databases questions

Question

Show the properties and structure of allotropes of carbon.

Answered: 1 week ago

Question

3. What should a contract of employment contain?

Answered: 1 week ago

Question

1. What does the term employment relationship mean?

Answered: 1 week ago