static void Main(string[] args) { string studentNumber; char classif; int speedLimit, speed; studentNumber = InputStudentNumber(); speedLimit = InputSpeed("Speed Limit"); speed = InputSpeed("Ticketed Speed"); classif = InputYearInSchool( ); Ticket studentTicket = new Ticket(studentNumber, classif, speedLimit, speed); Console.Clear(); Console.WriteLine(studentTicket); Console.ReadKey( ); }
static void Main(string[] args) { int speedLimit, speed; char classif; speedLimit = InputSpeed("Speed Limit", out speedLimit); speed = InputSpeed("Ticketed Speed", out speed); classif = InputYearInSchool(); Ticket myTicket = new Ticket(speedLimit, speed); myTicket.SetFine(classif); Console.WriteLine("Fine: {0:C}", myTicket.Fine); Console.ReadLine(); }