Created
April 6, 2013 06:59
-
-
Save dylanroy/5325208 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) | |
{ | |
//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