Initial commit
This commit is contained in:
commit
09eb0da6cd
11 changed files with 1014 additions and 0 deletions
24
Marathons/Program.cs
Normal file
24
Marathons/Program.cs
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
using System.Text;
|
||||
using Marathons;
|
||||
|
||||
Console.OutputEncoding = Encoding.UTF8;
|
||||
|
||||
Console.WriteLine("*** Marathon ***");
|
||||
|
||||
var p1 = new Participant(591, "Jeb", new TimeSpan(2, 05, 41));
|
||||
var p2 = new Participant(24, "Bill", new TimeSpan(4, 15, 23));
|
||||
var p3 = new Participant(167, "Bob", new TimeSpan(3, 34, 18));
|
||||
var p4 = new Participant(408, "Val", new TimeSpan(2, 05, 41));
|
||||
var marathon = new Marathon("Linz", new DateOnly(2024, 10, 30));
|
||||
|
||||
marathon.AddParticipant(p1);
|
||||
marathon.AddParticipant(p2);
|
||||
marathon.AddParticipant(p3);
|
||||
marathon.AddParticipant(p4);
|
||||
marathon.RemoveParticipant(p2.StartNo);
|
||||
|
||||
Console.WriteLine($"Here are the results for {marathon}:");
|
||||
foreach (var resultLine in marathon.GetResultList())
|
||||
{
|
||||
Console.WriteLine(resultLine);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue