示例#1
0
 public GSM(string model, string manufacturer, int price, string owner, Battery battery, Display display)
 {
     this.model = model;
     this.manufacturer = manufacturer;
     this.price = price;
     this.owner = owner;
     this.battery = battery;
     this.display = display;
 }
示例#2
0
 public GSM(string model, string manufacturer, int price)
 {
     this.model = model;
     this.manufacturer = manufacturer;
     this.price = price;
     this.owner = null;
     this.battery = null;
     this.display = null;
 }
示例#3
0
 //task2
 public GSM(string phoneModel, string phoneManufacturer, decimal phonePrice, string phoneOwner, Battery phoneBattery, Display phoneDisplay)
 {
     this.Battery = phoneBattery;
     this.Display = phoneDisplay;
     this.Model = phoneModel;
     this.Manufacturer = phoneManufacturer;
     this.Price = phonePrice;
     this.Owner = phoneOwner;
     this.CallHistory = new List<Call>(); //task9
 }
 public GSM(string model, string manufacturer, decimal? price, string owner, string batteryModel, double? batteryIdleTime, 
     double? batteryTalkTime, double? displaySize, uint? displayColors, BatteryType batteryType)
 {
     this.Model = model;
     this.Manufacturer = manufacturer;
     this.Price = price;
     this.Owner = owner;
     this.battery = new Battery(batteryModel, batteryIdleTime, batteryTalkTime, batteryType);
     this.display = new Display(displaySize, displayColors);
 }
示例#5
0
 public MobilePhone(string model, string manufacturer, decimal price, string owner = null, Battery battery = null, Display display = null)
 {
     this.Model = model;
     this.Manufacturer = manufacturer;
     this.Price = price;
     this.Owner = owner;
     if (battery == null)
     {
         battery = new Battery();
     }
     this.battery = battery;
     if (display == null)
     {
         display = new Display();
     }
     this.display = display;
     this.CallHistory = new List<Call>();
 }
示例#6
0
 public GSM(string model, string manufacturer, decimal? price, string owner, Battery battery, Display display)
     : this(model, manufacturer, price, owner, battery)
 {
     this.DisplayCharacteristics = display;
 }
示例#7
0
 public GSM(string model, string manufacturer, decimal? price, string owner, Battery battery)
     : this(model, manufacturer, price, owner)
 {
     this.BatteryCharacteristics = battery;
 }
示例#8
0
 public Gsm(string model, string manufacture, decimal? price, string owner, Battery baterry, Display display)
     : this(model, manufacture, price, owner, baterry)
 {
     this.Display = display;
 }
示例#9
0
 public Gsm(string model, string manufacture, decimal? price, string owner, Battery baterry)
     : this(model, manufacture, price, owner)
 {
     this.Battery = baterry;
 }
示例#10
0
 public GSM(string model, string manufacturer, Battery battery, Display display)
     : this(model, manufacturer, battery)
 {
     this.display = new Display();
 }
示例#11
0
 public GSM(string model, string manufacturer, Battery battery)
     : this(model, manufacturer)
 {
     this.battery = new Battery("Unknown model");
 }
示例#12
0
 //constructor with all the info
 public GSM( string model, string manufacturer, float? price, string owner, 
     string batteryModel, float? hoursIdle, float? hoursTalk, BatteryType? batteryType,
     int? size, long? numberColors)
 {
     this.Model = model;
     this.Manufacturer = manufacturer;
     this.Price = price;
     this.Owner = owner;
     this.battery = new Battery(batteryModel, hoursIdle, hoursTalk, batteryType);
     this.display = new Display(size, numberColors);
 }