예제 #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            PaulsDigitalWatch p = new PaulsDigitalWatch(3, 3, 3);
            MessageBox.Show(TimeDisplayer.GetTimeDisplay(p));

            PaulsAdvancedDigitalWatch pa = new PaulsAdvancedDigitalWatch();
            MessageBox.Show(TimeDisplayer.GetTimeDisplay(pa));
        }
예제 #2
0
        private static void ObjectsAndClasses()
        {
            PaulsAdvancedDigitalWatch pa = new PaulsAdvancedDigitalWatch();
            pa.IsLighted = true;
            pa.S();
            Console.WriteLine(pa.GetMilitaryTimeDisplay());

            PaulsDigitalWatch p = new PaulsDigitalWatch();
            p.Seconds = 35;
            p.SetMinutes(45);
            p.SetHours(200);

            p.Seconds = 4;
            Console.WriteLine(p.Seconds);

            p.SetTime(12, 45, 55);

            Console.WriteLine(p.GetMilitaryTimeDisplay());

            PaulsDigitalWatch p2 = new PaulsDigitalWatch(4, 34, 29);
        }