private void enterButton_Click(object sender, EventArgs e) { aVehicle.Speed = Convert.ToDouble(speedTextBox.Text); min = aVehicle.GetMinSpeed(); max = aVehicle.GetMaxSpeed(); average = aVehicle.GetAverage(); speedTextBox.Text = ""; }
private void showButton_Click(object sender, EventArgs e) { maximumTextBox.Text = aVehicle.Maximum.ToString(); minimumTextBox.Text = aVehicle.Minimum.ToString(); averageTextBox.Text = aVehicle.GetAverage().ToString(); }