static void Main(string[] args) { Animal dog = new Animal(); dog.eat(); dog.drink(); Console.WriteLine("{0}\n{1}\n", dog.hunger, dog.thirst); }
static void Main(string[] args) { Animal horse = new Animal(); horse.drink(); Animal cat = new Animal(50, 50); cat.drink(); cat.play(); horse.GetValues(); cat.GetValues(); }
static void Main(string[] args) { Animal Duck = new Animal(); Duck.drink(); Duck.eat(); Duck.play(); Console.ReadLine(); }
static void Main(string[] args) { /*Animal * Create an Animal class * Every animal has a hunger value, which is a whole number * Every animal has a thirst value, which is a whole number * when creating a new animal object these values are created with the default 50 value * Every animal can eat() which decreases their hunger by one * Every animal can drink() which decreases their thirst by one * Every animal can play() which increases both by one*/ Animal Monkey = new Animal(); Monkey.drink(); Monkey.eat(); Monkey.play(); Console.ReadLine(); }