Ejemplo n.º 1
0
    static void Main(string[] args)
    {
        Computers computers = new Laptop();

        Console.WriteLine(computers.GetType() + ": " + computers.GetName());
        Console.WriteLine(computers.PlayGame("change-game"));
        Console.WriteLine("---------------------");
        computers = new Desktop();
        Console.WriteLine(computers.GetType() + ": " + computers.GetName());
        Console.WriteLine(computers.PlayGame("change-game"));
        Console.WriteLine("---------------------");
        computers = new Monoblock();
        Console.WriteLine(computers.GetType() + ": " + computers.GetName());
        Console.WriteLine(computers.PlayGame("change-game"));
    }