static void Main() { TestMotorcycle moto = new TestMotorcycle(); moto.StartEngine(); moto.AddGas(15); var travelTime = moto.Drive(speed: 60, miles: 170); Console.WriteLine("Travel time: approx. {0} hours", travelTime); }
static void Main() { TestMotorcycle moto = new TestMotorcycle(); moto.StartEngine(); moto.AddGas(15); moto.Drive(5, 20); double speed = moto.GetTopSpeed(); Console.WriteLine("My top speed is {0}", speed); }
static void Main() { TestMotorcycle moto = new TestMotorcycle(); moto.StartEngine(); moto.AddGas(15); // <Snippet46> var travelTime = moto.Drive(170, speed: 55); // </Snippet46> Console.WriteLine("Travel time: approx. {0} hours", travelTime); }