Hi,
I am just a beginner to c++. I have got a following question in the written test of an interview. Someone please do help me. It's very urgent for me.
A zoo has different types and size of cages and different types of animals.
following are the conditions:
1. In a cage one or more animals can be accommodated - provided that total size of the animals should be at least 50% of the size of the cage size.
2. some animals could not be put along with another in the same cage - for example deer cannot be put along with lion in the same cage.
3. Animals can be put in a cage only if its size fits in the cage.
The only functionality is when an animal is brought to zoo,there should be a function that will say whether that animal can be fit in any of the available cages, if not then a new cage should be created and assigned.
a) come with class design for the above specification.
b) write classes with data members and necessary member functions.