public void WashingServiceHandler(object sender, WashingService service) { if (IsClean == false) { if (WashCard.Balance >= service.Price) { IsClean = true; WashCard.Balance -= service.Price; Console.WriteLine($"The {Brand} is clean now! {service.Price} was deducted from the car's washing card."); } else { Console.WriteLine($"The amount on {Brand} washing card is insufficient to cover this service!"); } } else { Console.WriteLine($"The {Brand} is already clean!"); } }
public void ServeCars(WashingService service) { ServiceAttempt.Invoke(this, service); }