Example #1
0
        public static void Main(string[] args)
        {
            Classes.Firefigther   firefigther   = new Classes.Firefigther("Joe Carrington", 35);
            Classes.PoliceOfficer policeofficer = new Classes.PoliceOfficer("Jane Hope", 32);

            firefigther.PensionAmount = 5000;
            firefigther.DriveToPlaceOfInterest();

            policeofficer.PensionAmount = 5500;
            policeofficer.HasEmergancy  = true;
            policeofficer.DriveToPlaceOfInterest();

            PrintNameAndAge(firefigther);
            PrintPensionAmount(firefigther);

            PrintNameAndAge(policeofficer);
            PrintPensionAmount(policeofficer);
        }
Example #2
0
        public static void Main(string[] args)
        {
            Classes.Firefigther   firefigther    = new Classes.Firefigther("Joe Carrington", 35);
            Classes.PoliceOfficer policeofficer  = new Classes.PoliceOfficer("Jane Hope", 32);
            Classes.PoliceOfficer policeofficer2 = new Classes.PoliceOfficer("Jane Valir", 32, true);

            PrintNameAndAge(firefigther);
            firefigther.PensionAmount = 5000;
            PrintPensionAmount(firefigther);
            firefigther.DriveToPlaceOfInterest();
            Console.WriteLine();

            PrintNameAndAge(policeofficer);
            policeofficer.PensionAmount = 5500;
            PrintPensionAmount(policeofficer);
            policeofficer.DriveToPlaceOfInterest();
            Console.WriteLine();

            PrintNameAndAge(policeofficer2);
            policeofficer2.PensionAmount = 5500;
            PrintPensionAmount(policeofficer2);
            policeofficer2.DriveToPlaceOfInterest();
            Console.WriteLine();
        }