Created
May 30, 2021 08:44
-
-
Save ssukhpinder/1f7f96843fe2a9c595a121eb292954ba to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static void Main(string[] args) | |
{ | |
Car car = new SmallCar(); | |
Console.WriteLine($"Price of car {car.GetName()} : " + car.CarPrice()); | |
var car1 = new Sunroof(car); | |
Console.WriteLine($"Price of car {car1.GetName()} : " + car1.CarPrice()); | |
var car2 = new AdvanceMusic(car); | |
Console.WriteLine($"Price of car {car2.GetName()} : " + car2.CarPrice()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment