Esempio n. 1
0
        public GSM(string gsmModel, string manufacturer, decimal? price, string owner, Battery battery, Display display)
        {
            if (gsmModel.Length < 0)
            {
                throw new ArgumentException();
            }
            else
            {
                this.gsmModel = gsmModel;
            }

            if (manufacturer.Length < 0)
            {
                throw new ArgumentException();
            }
            else
            {
                this.manufacturer = manufacturer;
            }

            if (price <= 0)
            {
                throw new ArgumentException();
            }
            else
            {
                this.price = price;
            }

            this.owner = owner;
            this.Batter = battery;
            this.Display = display;
        }
Esempio n. 2
0
 public GSM(string gsmModel, string manufacturer, decimal? price, string owner, Battery battery)
     : this(gsmModel, manufacturer, price, owner, battery, null)
 {
 }