Ejemplo n.º 1
0
    static void Main()
    {
        TitleUnderlined myTitle = new TitleUnderlined();

        Console.Write("Enter X: ");
        int x = Convert.ToInt32(Console.ReadLine());

        Console.Write("Enter Y: ");
        int y = Convert.ToInt32(Console.ReadLine());

        Console.Write("Enter text: ");
        string t = Console.ReadLine();

        myTitle.SetX(x);
        myTitle.SetY(y);
        myTitle.SetText(t);
        myTitle.Display();

        Title mySecondTitle = new Title();

        mySecondTitle.SetX(x + 2);
        mySecondTitle.SetY(y + 3);
        mySecondTitle.SetText(t);
        mySecondTitle.Display();
    }
    static void Main()
    {
        Title t = new Title();

        t.Show();

        TitleUnderlined t2 = new TitleUnderlined();

        t2.SetX(30);
        t2.SetY(15);
        t2.SetText("Bye!");
        t2.Show();
    }
Ejemplo n.º 3
0
    static void Main()
    {
        Title[] titles = new Title[6];
        for (int i = 0; i < 3; i++)
        {
            titles[i] = new Title(4, 5 + i, "Hi!");
        }
        for (int i = 3; i < 6; i++)
        {
            titles[i] = new TitleUnderlined(10, 5 + i * 2, "Hi Underlined!");
        }

        for (int i = 0; i < 6; i++)
        {
            titles[i].Display();
        }
    }
    static void Main()
    {
        Title t = new Title();

        // t.SetX(40);
        // t.SetY(12);
        // t.SetText("Hello!");
        t.Init();
        t.Show();

        TitleUnderlined t2 = new TitleUnderlined();

        t2.SetX(30);
        t2.SetY(15);
        t2.SetText("Bye!");
        t2.Show();
    }