Use the class diagrams below to create the object classes.

All animals are a subclass of animal

Cat and Dog are a subset of mammal

***** You must use the class diagrams provided. ****

***** Your objects must match the class diagrams *****

** Each class file must be in its own file, separate from the main.

Animal
- String _color
- String _name
- int_weight
+ Animal(String color, String name, int weight)
+ String getColor()
+ String getName()
+ int getWeight()
+ void setColor(String color)
+ void setName(String name)
+ void setWeight(int weight)
+ String toString()

Bird
- boolean _wings
- boolean _stripe
- String _stripeColor
+ Bird(boolean wings, boolean stripe, String stripeColor, String color, String name, int weight)
+ void setWings(boolean wings)
+ void setStripe(boolean stripe)
+ void setStripeColor(String stripeColor)
+ boolean isWings()
+ boolean isStripe()
+ String getStripeColor()
+ String toString()

Fish
- int _fins
- boolean _teeth
- String _freshOrSalt
+ Fish(int fins, boolean teeth, String freshOrSalt, String color, String name, int weight)
+ void setFins(int fins)
+ void setTeeth(boolean teeth)
+ void setFreshOrSalt(String freshOrSalt)
+ int getFins()
+ boolean isTeeth()
+ String getFreshOrSalt()
+ String toString()

Mammal
- String _coldOrWarm
- int _numLegs
- boolean _fur
+ Mammal(String coldOrWarm, int numLegs, boolean fur, String color, String name, int weight)
+ void setColdOrWarm(String coldOrWarm)
+ void setNumLegs(int numLegs)
+ void setFur(boolean fur)
+ String getColdOrWarm()
+ int getNumLegs()
+ boolean isFur()
+ String toString()

Cat
- boolean _claws
- String _hairShortLong
+ Cat(String coldOrWarm, int numLegs, boolean fur, String color, String name, int weight, boolean claws, String hairShortOrLong)
+ boolean isClaws()
+ void setClaws(boolean claws)
+ String getHairShortLong()
+ void setHairShortLong(String hairShortLong)
+ String toString()

Dog
- boolean _bits
- String _breed
+ Dog(String coldOrWarm, int numLegs, boolean fur, String color, String name, int weight, boolean bites, String breed)
+ void setBites(boolean bites)
+ void setBreed(String breed)
+ boolean isBites()
+ String getBreed()
+ String toString()

*** toString should be implemented in each animal class for the specific animal attributes.

Write a driver program for a vet clinic that asks the user for the animal type (Fish, Bird, Dog, or Cat) and then prompts the user to enter all pertinent information for that animal type.

Print out a report for the user with all the information from their animal, once they have completed entering the data.

Once completed, ask the user if they want to enter another animal, if so allow them to select again.

If the user does not want to enter another animal, then end the program.

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.