Skip to content

dcornish84/DiggersAndFliersPractice

Repository files navigation

Practice: Diggers and Fliers

As an avid animal lover, you have started your very own collection of creatures in your home. You can use the code from the lesson as a starting point to have interfaces for walking and swimming animals, but you want to have several other kinds in your collection.

This is the list of animals you want to own and care for.

  1. Parakeets
  2. Earthworms
  3. Terrapins
  4. Timber Rattlesnake
  5. Mice
  6. Ants
  7. Finches
  8. Betta Fish
  9. Copperhead snake
  10. Gerbils

Each month, you clean out all of the habitats in a single day for efficiency. On that day, all animals need to be put into temporary containers. Each container will hold animals of similar similar, but different, types.

  • Animals that dig and live in the ground
  • Animals that move about on the ground
  • Animals that swim in water
  • Animals that fly above the ground
  1. Before you write any classes for the above animals, determine the common properties and behaviors that some of them share and define interfaces first.
  2. Once you believe you have a good set of interfaces, then start creating your specific animal classes and have them implement the appropriate interface.
  3. Then define classes to represent the containers that will hold various animals. Each container class should have a single property - a list to hold animal instances.
  4. Lastly, in Main() create one (or more if you like) instances of each type of animal and each container. Then add the animals to their corresponding container.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages