예제 #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;
        }
예제 #2
0
 public GSM(string gsmModel, string manufacturer, decimal? price, string owner, Battery battery)
     : this(gsmModel, manufacturer, price, owner, battery, null)
 {
 }