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)); }
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); }