Esempio n. 1
0
        static void Main(string[] args)
        {
            SportBike bike = new SportBike();

            bike.MaxSpeedPublic   = 230;
            bike.MaxSpeedInternal = 200;
            bike.MaxSpeedInternalProtected();
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            SportBike Kavasaki = new SportBike();

            Kavasaki.EngineTypePublic();
            Console.WriteLine(Kavasaki.MaxSpeedPublic);
            Console.WriteLine(Kavasaki.VolumePublic);
            Console.WriteLine(Kavasaki.TurbinePublic);

            Bike KavasakiNinja = new Bike();

            KavasakiNinja.EngineTypeInternal();
            Console.WriteLine(KavasakiNinja.MaxSpeedInternal);
            Console.WriteLine(KavasakiNinja.VolumeInternal);
            Console.WriteLine(KavasakiNinja.TurbineInternal);
        }
Esempio n. 3
0
        static void Main(string[] args)
        {
            MotorcycleInternal motorcycleInternal = new MotorcycleInternal();

            motorcycleInternal.StartEnginePublic();
            int age = motorcycleInternal.ageMotobike;

            MotorcyclePublic motorcyclePublic = new MotorcyclePublic();
            string           engineNumber     = motorcyclePublic.engineNumberPublic;
            int speedInternal = MotorcyclePublic.MaxSpeedInternal;

            SportBike sportBike = new SportBike();

            sportBike.StartEngineInternal();
            sportBike.StartEngineProtectedInternal();
            sportBike.StartEnginePublic();
            int    ageSportbike  = sportBike.ageMotobike;
            string nameSportbike = sportBike.nameMotobike;
        }
Esempio n. 4
0
        static void Main(string[] args)
        {
            Motorcycle yamaha = new SportBike(model: "Yamaha", redisigned: true);

            yamaha.CountryOfOrigin = "Japan";
            yamaha.StartEngine();
            UseBike(yamaha);
            yamaha.StopEngine();
            yamaha.TurnOnCoolMusic();

            SportBike unknownBike = new SportBike();

            unknownBike.StartEngine();
            unknownBike.StopEngine();
            unknownBike.TurnOnCoolMusic();

            Console.WriteLine($"Class {yamaha.GetType()}; Model {((SportBike)yamaha).Model}; Max Speed {((SportBike)yamaha).MaxSpeed}; Vin {yamaha.VinNumber}; Odometr {yamaha._odometer}; Country: {yamaha.CountryOfOrigin}; Engine {yamaha._engineVolume}");
            Console.WriteLine($"Class {unknownBike.GetType()}; Model {unknownBike.Model}; Max Speed {unknownBike.MaxSpeed}; Vin {unknownBike.VinNumber}; Odometr {unknownBike._odometer}; Country: {unknownBike.CountryOfOrigin}; Engine {unknownBike._engineVolume}");

            Console.ReadKey();
        }