Question: Write a program where a user populates a collection of various cats and dogs. The user should be able to specify which type they wish

Write a program where a user populates a collection of various cats and dogs. The user should be able to specify which type they wish to enter, and then are prompted with the pertinent information for every type of pet.(JAVA) Should follow this UMD Diagram. Also,

The weight for animal should be strictly greater than 0

The mood for a cat should either be sleepy, playful, or hungry

The energy level for a dog should be between 0 and 100 inclusively

The type of house cat should one of the following

Short Hair

Bombay

Ragdoll

Sphinx

Scottish Fold

The type of domestic dog should be one of the following

Retriever

Terrier

Husky

Yappy

Mutt

In addition to whats specified in the UML diagram, the classes, Animal, Cat, Dog, HouseCat, Leopard, Domestic Dog, and Wolf must have

Constructors (Both default and parameterized)

Accessors and Mutators

A toString method

An equals method

In addition to whats specified in the UML diagram, AnimalCollection only needs a default constructor which will set the array of animals to some constant default size. Also no Accessors or Mutators.

Remember the block arrows are the is a relationship so it means inheritance

The line arrows are the has a relationship so it contains one or more instances of that class

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!