Exemple #1
0
 public GSM(string phoneModel, string phoneManufacturer, decimal phonePrice, string phoneOwner, Battery myBattery, Display myDisplay)
     : this(phoneModel, phoneManufacturer, phonePrice)
 {
     this.OwnerName = phoneOwner;
     this.Battery = myBattery;
     this.Display = myDisplay;
 }
Exemple #2
0
Fichier : GSM.cs Projet : GAlex7/TA
 public GSM(string modelGSM, string manifactGSM)
 {
     this.Model = modelGSM;
     this.Manufacturer = manifactGSM;
     this.batteryCharacteristics = new Battery();
     this.displayCharacteristics = new Display();
     this.callHistory = new List<Call>();
 }
Exemple #3
0
 public GSM(string manufacturer, string model, string owner = null, double price = 0, Battery battery = null, Display display = null)
 {
     this.manufacturer = manufacturer;
     this.model = model;
     this.owner = owner;
     this.price = price;
     this.battery = battery;
     this.display = display;
 }
Exemple #4
0
Fichier : GSM.cs Projet : GAlex7/TA
 public GSM(string modelGSM, string manifactGSM, decimal priceGSM, string ownerGSM, Battery batt, Display displ)
     : this(modelGSM, manifactGSM)
 {
     this.Price = priceGSM;
     this.Owner = ownerGSM;
     this.batteryCharacteristics = batt;
     this.displayCharacteristics = displ;
     this.callHistory = new List<Call>();
 }
 public GSM(string model, string manufacturer, double? price, string owner, Battery bat, Display disp)
 {
     this.model = model;
     this.manufacturer = manufacturer;
     this.price = price;
     this.owner = owner;
     this.phoneBat = bat;
     this.phoneDisp = disp;
 }
        static void Main()
        {
            Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;

            Battery myBattery = new Battery("Bateria");
            Display myDisplay = new Display();
            GSM myGSM = new GSM("Nokia","Nokia", 100.23M, "Pesho",myBattery,myDisplay);
            string myGSMinfo = myGSM.ToString();
            Console.WriteLine(myGSMinfo);

            GSM mySecondGSM = GSM.IPhone4S;

            Console.WriteLine(mySecondGSM);

            GSMTest test = new GSMTest();
            test.Create4GSMs();

            GSMCallHistoryTest secondTest = new GSMCallHistoryTest();
            secondTest.CallHistoryTest();
        }
Exemple #7
0
 public string PrintMobileInfo(Battery battery, Display display)
 {
     string manufacturer = this.Manufacturer;
     string model = this.Model;
     string price = this.Price.ToString();
     string owner = this.Owner;
     this.CallHistory = new List<Call>();
     string mobileInfo = string.Format("Mobile Info:\nManufacturer:{0}\nModel: {1}\nPrice: {2}\nOwner: {3}", manufacturer, model, price, owner);
     string result = string.Format("{0} \nBattery info: {1}\nDisplay info: {2}", mobileInfo, battery.PrintInfoForBattery(), display.PrintInfoForDisplay());
     return result;
 }
Exemple #8
0
 public GSM(string model, string manufacturer, double?price, string owner, Display display, Battery battery)
     : this(model, manufacturer, price, owner)
 {
     this.display     = display;
     this.battery     = battery;
     this.CallHistory = new List <Call>();
 }
Exemple #9
0
 public GSM(string modelGSM, string manifactGSM, decimal priceGSM, string ownerGSM, Battery batt, Display displ)
     : this(modelGSM, manifactGSM)
 {
     this.Price = priceGSM;
     this.Owner = ownerGSM;
     this.batteryCharacteristics = batt;
     this.displayCharacteristics = displ;
     this.callHistory            = new List <Call>();
 }
Exemple #10
0
 public GSM(string model, string manifacturer, string owner, double price, Battery battery, Display display)
     : this(model, manifacturer, owner, price)
 {
     this.Battery = battery;
     this.Display = display;
 }
Exemple #11
0
 public GSM(string model, string manifacturer, Battery battery, Display display)
     : this(model, manifacturer, battery)
 {
     this.Display = display;
 }
Exemple #12
0
 public GSM(string model, string manifacturer, Battery battery)
     : this(model, manifacturer)
 {
     this.Battery = battery;
 }
Exemple #13
0
 static void Main(string[] args)
 {
     Battery battery1 = new Battery("asdasasd", "asdasdasd", "asdasdas", BatteryType.LIon);
     Display display1 = new Display("10x10", "Niggerian");
     GSM     number1  = new GSM("samsung", "galaxy", 300, "Shefa", battery1, display1);
 }
Exemple #14
0
 public GSM(string model = null, string manufacturer = null, decimal price = 0, string owner = null, Battery battery = null, Display display = null)
 {
     this.Model        = model;
     this.Manufacturer = manufacturer;
     this.Price        = price;
     this.Owner        = owner;
     this.Battery      = battery;
     this.Display      = display;
 }