Lions, tigers, and bears..
Properties:
name
age
kind
- a horse/lion/pig for exampleawake
- should default tofalse
methods:
oink()
- returns "oink!" if the instance of an animal is a pig.growUp()
- a method that increases the age of the animal by onefeed()
- if the animal is awake, return "NOM NOM NOM"wakeUp()
- a method that changes the awake property totrue
sleep()
- a method that changes the awake property tofalse
name
location
status
- this should default to "closed"animals
- this should default to an empty arraychangeLocation()
- a method that updates the location of the zooopen()
- a method that changes the status to "open"close()
- open - a method that changes the status to "closed"isOpen()
- a method that returns "Open!" if the zoo is not closedaddAnimal()
- a method that adds an animal to the animals array ONLY if the zoo is open, the animal is an instance of the Animal class AND the animal is not already in the animals array.removeAnimal()
- a method that removes an animal from the animals array ONLY if the zoo is open.
- Write the tests for the Animal class
- Write the code (in the *"src" folder) necessary to make the tests pass
- Repeat this same process (TDD!) for the Zoo class