Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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