Ejemplo n.º 1
0
        public static void Main(string[] args)
        {
            Firefighter firefighter = new Firefighter ("Joe Carrington", 35);
            firefighter.PensionAmount = 5000;

            PoliceOfficer officer = new PoliceOfficer ("Jane Hope", 32);
            officer.PensionAmount = 5500;
            officer.HasEmergency = true;

            PrintNameAndAge(firefighter);
            PrintNameAndAge(officer);

            PrintPensionAmount(firefighter);
            PrintPensionAmount(officer);

            firefighter.DriveToPlaceOfInterest();
            officer.DriveToPlaceOfInterest();
        }
Ejemplo n.º 2
0
        public static void Main(string[] args)
        {
            Firefighter firefighter = new Firefighter("Joe Carrington", 35);

            firefighter.PensionAmount = 5000;

            PoliceOfficer officer = new PoliceOfficer("Jane Hope", 32);

            officer.PensionAmount = 5500;
            officer.HasEmergency  = true;

            PrintNameAndAge(firefighter);
            PrintNameAndAge(officer);

            PrintPensionAmount(firefighter);
            PrintPensionAmount(officer);

            firefighter.DriveToPlaceOfInterest();
            officer.DriveToPlaceOfInterest();
        }