Skip to content

Instantly share code, notes, and snippets.

@dylanroy
Created April 6, 2013 06:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dylanroy/5325208 to your computer and use it in GitHub Desktop.
Save dylanroy/5325208 to your computer and use it in GitHub Desktop.
static void Main(string[] args)
{
//1. Implementing a Roadster with an IVehicle.
IVehicle aVehicle = new Roadster();
String startDriving = aVehicle.Drive();
Console.WriteLine("All vehicles are made to drive... "+ startDriving);
//2. Implementing a Roadster with its concrete class.
Roadster aTeslaRoadster = new Roadster();
aTeslaRoadster.Drive();
String make = aTeslaRoadster.GetMake();
Console.WriteLine("A Tesla Roadster knows that it has been created by " + make);
Console.WriteLine("Press Any Key To Exit...");
Console.ReadLine();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment