Created
February 26, 2012 19:08
-
-
Save kevinpang/1918351 to your computer and use it in GitHub Desktop.
You2
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
public class You { | |
private ICar myCar; | |
public You(ICar car) | |
{ | |
myCar = car; | |
} | |
public void Drive(IList<Person> passengers, Location destination) | |
{ | |
foreach (var passenger in passengers) | |
myCar.AddPassenger(passenger); | |
myCar.Drive(destination); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment