Esempio n. 1
0
 public Battery(string model, int hoursIdle, int hoursTalk, BatteryTypeEnum batteryType)
 {
     this.model       = model;
     this.hoursIdle   = hoursIdle;
     this.hoursTalk   = hoursTalk;
     this.batteryType = batteryType;
 }
Esempio n. 2
0
 //Constructor with model and type mendatory and the rest optional
 public PhoneBattery(string model, BatteryTypeEnum type, int idleHours = default(int), int talkHours = default(int))
 {
     this.model     = model;
     this.IdleHours = idleHours;
     this.TalkHours = talkHours;
     this.type      = type;
 }
Esempio n. 3
0
 // Empty constructor - sets all fields to their defaul values
 public PhoneBattery()
 {
     this.model     = default(string);
     this.IdleHours = default(int);
     this.TalkHours = default(int);
     this.type      = default(BatteryTypeEnum);
     this.parent    = default(MobilePhone);
 }
Esempio n. 4
0
 public Battery(BatteryTypeEnum batteryTypeEnum, int hoursIdle, int hoursTalk)
 {
     this.batteryTypeEnum = batteryTypeEnum;
     this.hoursIdle       = hoursIdle;
     this.hoursTalk       = hoursTalk;
 }