Exemplo n.º 1
0
 public static void Main()
 {
     OneWayStreet oak = new OneWayStreet("Oak Avenue", "east");
       TwoWayStreet elm = new TwoWayStreet("Elm Street", "south");
       Console.WriteLine("On " + oak.Name + " " + oak.MakeUTurn());
       Console.WriteLine("On " + oak.Name + " " + oak.MakeUTurn());
       Console.WriteLine("On " + elm.Name + " " + elm.MakeUTurn());
       Console.WriteLine("On " + elm.Name + " " + elm.MakeUTurn());
 }
Exemplo n.º 2
0
    public static void Main()
    {
        OneWayStreet oak = new OneWayStreet("Oak Avenue", "east");
        TwoWayStreet elm = new TwoWayStreet("Elm Street", "south");

        Console.WriteLine("On " + oak.Name + " " + oak.MakeUTurn());
        Console.WriteLine("On " + oak.Name + " " + oak.MakeUTurn());
        Console.WriteLine("On " + elm.Name + " " + elm.MakeUTurn());
        Console.WriteLine("On " + elm.Name + " " + elm.MakeUTurn());
    }