public void SetData(string name, int age, TypeOfPet type, string species, string taste) { base.Name = name; base.Age = age; base.Type = type; this.Species = species; this.Taste = taste; }
public Pets(string name, int age, TypeOfPet typeOfPet) { Name = name; Age = age; Type = typeOfPet; switch (typeOfPet) { case TypeOfPet.Dog: _isFriendly = true; break; case TypeOfPet.Cat: _isFriendly = true; break; default: _isFriendly = false; break; } }
public static Product CreateProduct(string name, string description, decimal price, int initial_quantity = 0, TypeOfPet pet = TypeOfPet.Dog) { var product = new Product { Name = name, Description = description, Price = price, Pet = pet, }; if (initial_quantity > 0) { product.Input(initial_quantity); } return(product); }
public void SetData(string name, int age, TypeOfPet type) { base.Name = name; base.Age = age; base.Type = type; }
public Dog(string name, int age, TypeOfPet type, string species, string taste) : base() { SetData(name, age, type, species, taste); }
public Dog(string name, int age, TypeOfPet type) : base() { SetData(name, age, type); }
public void SetData(string name, int age, TypeOfPet type) { this.Name = name; this.Age = age; this.Type = type; }
public Pet(string name, int age, TypeOfPet type, string species, string taste) : this() { SetData(name, age, type); }