Пример #1
0
        public override string ToString()
        {
            GSM gsm = new GSM();

            return("Model: " + this.model + "\nManufacturer: " + this.manufacturer + "\nPrice: " + this.price +
                   "\nOwner: " + this.owner + this.display.ShowInfo() + this.battery.ShowBattery());
        }
Пример #2
0
        public static GSM  IPhone4S()
        {
            Display displayIp4s = new Display(4, "3.5 inches, 36.5 cm2 (~54.0% screen-to-body ratio)");
            Battery batteryIp4s = new Battery("Non-removable Li-Po 1432 mAh battery", 200, 14);
            GSM     gsmIP4s     = new GSM("Iphone", "Apple", 5000000, "no Owner", displayIp4s, batteryIp4s);

            return(gsmIP4s);
        }
Пример #3
0
        static void Main(string[] args)
        {
            Display display = new Display(3, "sdd1212");
            Battery battery = new Battery("asdas", 1000, 1000);
            GSM     gsm     = new GSM("dfsd", "sds", 20000, "adfds sdsa", display, battery);
            GSM     IP4S    = new GSM();

            IP4S = GSM.IPhone4S();
        }