C# - C Sharp: Practical 3: Zoo Management System
ZOO MANAGEMENT SYSTEM
1. Create class Animal has some properties and methods:
· String Name
· Int Age
· String Description
· Void ViewInfo() //display Name, Age, and Description of the animal
· Void Speak()
2. Create some constructors for class Animal that we can input n parameter(s) when creating new instance from class:
· 0 parameter
· 1 parameter ( Name),
· 2 parameters ( Name, Age),
· 3 parameters ( Name, Age, Description).
3. Create some classes: Tiger, Dog, Cat following these instructions:
- Inherit properties and methods from class Animal
- Override method Speak to demonstrate different sounds of different animals
- Implement multiple constructors for these classes using constructors inheritance
4. Create class Cage has some properties and methods:
· Int CageNumber
· ArrayList AnimalList
· Void AddAnimal(Animal a) //add an animal to AnimalList
· Void RemoveAnimal(string name) //remove an animal has Name “name” from AnimalList
5. Create class Zoo has some properties and methods:
· ArrayList CageList
· Void AddCage(Cage c) //add a cage to CageList
· Void RemoveCage(int c) //remove a cage has CageNumber c from CageList
6. Create menu for Zoo Management System:
- Add Cage
- Remove Cage
- Add Animal
- Remove Animal
- Iterate Animals
- Exit
7. When user choose Iterate Animal, go to all the cages in Zoo, display information of all animals in cage and display their voice.