public override Mobile ProduceMobile()
        {
            Console.WriteLine("Enter Feature phone name:");
            var name = Console.ReadLine();

            Console.WriteLine("Enter Feature phone price:");
            var price = double.Parse(Console.ReadLine());

            Mobile mobile = new FeaturePhone(name, price);

            return(mobile);
        }
예제 #2
0
        public void SmartPhoneBeforeTest()
        {
            var phone = new Phone();

            phone.InstallApp();
            Assert.NotNull(phone);

            var smartPhone = new SmartPhone();

            smartPhone.InstallApp();
            Assert.NotNull(smartPhone);

            var featurePhone = new FeaturePhone();

            featurePhone.InstallApp();
            Assert.NotNull(smartPhone);
        }
예제 #3
0
        static void Main(string[] args)
        {
            SampleDataBank sampleData = new SampleDataBank();
            var            temp       = sampleData.sampleDoubleArray;

            //var alenCar = new Car();
            // bool carStatus = alenCar.StartEngine(true);

            // var demoConstructorChaining = new ConstructorChaining(2);

            //School mySchool = new School("HFCS", "School", "Education", 50, 2000, "English");

            #region Inheritance&PolyMorphism

            #endregion

            #region ExpectionHandling Topics

            FeaturePhone featurePhone = new FeaturePhone("Nokia 3315", "FeaturePhone");
            featurePhone.FeatureHiding();
            ((ExceptionInvokerCellPhone)featurePhone).FeatureHiding();
            #endregion
        }
예제 #4
0
        public void FeaturePhoneTest()
        {
            var featurePhone = new FeaturePhone();

            Assert.NotNull(featurePhone);
        }