Beispiel #1
0
        static void Main(string[] args)
        {
            Console.WriteLine("This is Quiz07");
            Shotgun S = new Shotgun();
            Rifle   R = new Rifle();
            Pistol  P = new Pistol();

            S.purpose();
            R.purpose();
            P.purpose();
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            Console.WriteLine("This is test 06");
            Firearm myFirearm = new Firearm();
            Shotgun myShotgum = new Shotgun();
            Rifle   myRifle   = new Rifle();
            Pistol  myPistol  = new Pistol();

            myFirearm.DoAction();
            myShotgum.DoAction();
            myRifle.DoAction();
            myPistol.DoAction();
        }