Skip to content

Instantly share code, notes, and snippets.

@ssukhpinder
Created May 30, 2021 08:44
Show Gist options
  • Save ssukhpinder/1f7f96843fe2a9c595a121eb292954ba to your computer and use it in GitHub Desktop.
Save ssukhpinder/1f7f96843fe2a9c595a121eb292954ba to your computer and use it in GitHub Desktop.
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