Exemplo n.º 1
0
        static void Main(string[] args)
        {
            Vehicle BasicVehicle = new Vehicle();

            BasicVehicle.Move();
            AirVehicle Helicopter = new AirVehicle();

            Helicopter.Move();
            WaterVehicle Boat = new WaterVehicle();

            Boat.Move();
            LandVehicle Tank = new LandVehicle();

            Tank.Move();
            Weapon BasicWeapon = new Weapon();

            BasicWeapon.Shoot();
            SmallCaliberWeapon M9 = new SmallCaliberWeapon();

            M9.Shoot();
            IndirectFireWeapon M203 = new IndirectFireWeapon();

            M203.Shoot();
            DirectFireWeapon M82 = new DirectFireWeapon();

            M82.Shoot();
        }
Exemplo n.º 2
0
        static void Main()
        {
            Vehicles           vehicles           = new Vehicles();
            Humvee             humvee             = new Humvee();
            Helicopter         helicopter         = new Helicopter();
            Weapons            weapons            = new Weapons();
            LargeCaliberWeapon largeCaliberWeapon = new LargeCaliberWeapon();
            SmallCaliberWeapon smallCaliberWeapon = new SmallCaliberWeapon();

            Console.WriteLine($"Default Vehicle: {vehicles.Start()} -- {vehicles.Move()}");
            Console.WriteLine($"Humvee: {humvee.Start()} -- {humvee.Move()}");
            Console.WriteLine($"Helicopter: {helicopter.Start()} -- {helicopter.Move()}");
            Console.WriteLine($"Default Weapon: {weapons.Load()} -- {weapons.Fire()}");
            Console.WriteLine($"LG Caliber Weapon: {largeCaliberWeapon.Load()} -- {largeCaliberWeapon.Fire()}");
            Console.WriteLine($"SM Caliber Weapon: {smallCaliberWeapon.Load()} -- {smallCaliberWeapon.Fire()}");
        }