Esempio n. 1
0
    public static void Main(string[] args)
    {
        Display d1 = new StringDisplay("Hello, world.");
        Display d2 = new SideBorder(d1, '#');
        Display d3 = new FullBorder(d2);

        d1.Show();
        d2.Show();
        d3.Show();

        Display d4 = new FullBorder(d3);

        d4.Show();
    }
Esempio n. 2
0
        static void Main(string[] args)
        {
            Display b1 = new StringDisplay("Hello, world.");
            Display b2 = new SideBorder(b1, '#');
            Display b3 = new FullBorder(b2);

            b1.Show();
            b2.Show();
            b3.Show();

            Display b4 = new SideBorder(new FullBorder(new SideBorder(new FullBorder(new StringDisplay("こんにちは。")), '*')), '/');

            b4.Show();
        }