Exemple #1
0
        private void Form1_Load(object sender, EventArgs e)
        {
            BasePhone basePhone = new BasePhone("alcatel", "kablolu");

            BasePhone basePhone1 = new BasePhone();

            basePhone1.Brand          = "Samsung";
            basePhone1.ConnectionType = "Kablolu";

            //MessageBox.Show(basePhone1.Sound());

            MobilPhone mobil = new MobilPhone(false, false, "nokia", "");
            //mobil.Brand = "Nokia";
            //mobil.ConnectionType = "Mobil";
            //mobil.HasCamere = false;
            //mobil.IsTouched = false;



            //MessageBox.Show(mobil.Sound());


            SmartPhone smartPhone = new SmartPhone(false, false, false, "nokia", "");


            MessageBox.Show("Smart : " + smartPhone.Brand + "\nMobil : " + mobil.Brand + "\nBase : " + basePhone.Brand);
        }
Exemple #2
0
        private void btnMobil_Click(object sender, EventArgs e)
        {
            MobilPhone phone = new MobilPhone();

            phone.Brand          = "Nokia";
            phone.ConnectionType = "Mobil";
            phone.IsTouched      = false;
            phone.HasCamera      = true;

            MessageBox.Show($"Telefon Markası : {phone.Brand}\nTelefon Bağlantı Türü : {phone.ConnectionType}\nTelefon Tipi : {phone.PhoneType}\nTelefon Zil Sesi : {phone.Sound()}\nFotoğraf : {phone.TakePhoto()}");
        }