currSpeed += delta;
}
}
As you can see, PrintState() is more or less a diagnostic function that will simply dump the
current state of a given Car object to the command window. SpeedUp() will increase the speed of the
Car by the amount specified by the incoming int parameter. Now, update your Main() method with
the following code:
static void Main(string[] args)
{
Console.WriteLine("***** Fun with Class Types *****\n");
Do'stlaringiz bilan baham: