ComputerScienceExpert

(11)

$18/per page/

About ComputerScienceExpert

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Applied Sciences,Calculus See all
Applied Sciences,Calculus,Chemistry,Computer Science,Environmental science,Information Systems,Science Hide all
Teaching Since: Apr 2017
Last Sign in: 9 Weeks Ago, 3 Days Ago
Questions Answered: 4870
Tutorials Posted: 4863

Education

  • MBA IT, Mater in Science and Technology
    Devry
    Jul-1996 - Jul-2000

Experience

  • Professor
    Devry University
    Mar-2010 - Oct-2016

Category > Programming Posted 03 May 2017 My Price 8.00

collection of Animals

Hello, I was wondering if you can help me in updating this class diagram using ARGO UML with the following corrections from the feedback below:

You should have a collection of Animals(s) in AnimalSet. Something like:

ArrayListr<Animal> animals

In your AnimalSet class, add methods to read from a file and write to a file.

You don't need to store age in Animal class because you can always calculate it based on birthDate. You also don't need to stor species or animalType attributes. You cannot store lifeExpectancy as a static attribute because 1) it is dynamic and would change as time goes by 2) its calculation would depend upon the animal and its specie. The getLifeExpectancy() method in the same class would do this. As you learn more about inheritance, think about how you can achieve this without these attributes.

You don't need the species attribute in Bird, Mammal, and Reptile classes.

You are missing Eagle, Hawk, Iguana, and Turtle classes. Please put them in.

Question 2: After the following corrections are implemented in this class diagram, please Introduce Composition and/or Aggregation into the class diagram.  Make sure for each Composition and/or Aggregation relation to indicate the cardinality.

 

 

OOP Project Description
Requirements:
You are to design and build a zoo organizer. The zoo organizer should keep track of
a set of animals. The zoo organizer should be able to keep track of different sets of
animals. The organizer only needs one set of animals open at a time. It should have
the capabilities to save the current set of animals to a file and also open a set from a
file.
There are 3 types of animals in the zoo. There are mammals, reptiles and birds. All
animals have a name, a birthdate, an age and a species. The following chart shows
the species that the organizer needs to track. It only needs to track these species.
Type
Mammal
Reptile
Bird Species
Goat
Lion
Pig
Turtle
Iguana
Eagle
Hawk Every animal also has a life expectancy, which is how many years we think that
animal should live. The following rules show how to determine the life expectancy.
1. All of the mammal’s life expectancy is 15 – age. So, if a mammal is 5 (15-5 =
10), the life expectancy is 10 years.
2. Iguana’s life expectancy is (1 / age) * 10. So if an iguana is 5 (1/5 * 10) = 2,
the life expectancy is 2 years.
3. Turtles seem to live very long. Their life expectancy is 110 – age. So if a
Turtle is 5, (110 – 5 – 105), the life expectancy is 105 years.
4. We don’t know much about the life expectancy of birds. Always show their
life expectancy as 5 years.
When a user creates a new set of animals, they need to be able to add an animal to
the set. They should also be able to update and delete animals in the set. The
organizer should only show one set of animals at a time.

Answers

(11)
Status NEW Posted 03 May 2017 02:05 AM My Price 8.00

-----------

Not Rated(0)