static void Main(string[] args) { var personelCar = new PersonelCar { Make = "BMW", Model = "3.20,", HirePrice = 2500 }; var specialOffer = new SpecialOffer(personelCar); Console.WriteLine("Concrete {0}", personelCar.HirePrice); Console.WriteLine("Special Offer {0}", specialOffer.HirePrice); Console.ReadLine(); }
static void Main(string[] args) { var personalCar = new PersonelCar { Make = "Bmw", Model = "3.20", HirePrice = 2500 }; SpecialOffer specialOffer = new SpecialOffer(personalCar); specialOffer.DiscountPercentage = 10; Console.WriteLine($"Concrete : {personalCar.HirePrice}"); Console.WriteLine($"Special offer : {specialOffer.HirePrice}"); Console.ReadLine(); }
static void Main(string[] args) { var personelCar = new PersonelCar { Make = "BMW", Model = "3.20", HirePrice = 2500 }; SpecialOffer specialOffer = new SpecialOffer(personelCar); specialOffer.DiscountPercentage = 20; Console.WriteLine("Concrete : " + personelCar.HirePrice); Console.WriteLine("Special offer : " + specialOffer.HirePrice); Console.ReadKey(); }