Question: java problem. Animal class Animal initializes the Animal with a name and age getAge returns the Animals age getName returns the Animals name move increments

java problem.
Animal class
Animal initializes the Animal with a name and age
getAge returns the Animals age
getName returns the Animals name
move increments the Animals position by distance.
vocalize abstract
Bird class
Bird initializes the Bird with a name and age
vocalize returns chirp
fly displays the message, flap-flap
Dog class
Dog(name,age) initializes the Dog with a name and age
Dog(name,age,ferocity) initializes the Dog with a name, age, and ferocity
vocalize returns bark
AgeComparator class
Compare compares two Animals based on their age
Person class
pets an unordered collection of Animals that can be accessed by their name.
Person creates a Person
Person(list) creates a Person and initializes pets with the specified list of Animals.
addPet adds the Animal to the pets collection
getPet returns the Animal with the specified name
getPets returns a list of the pets ordered by the specified comparator
givePetAway the Animal with the specified name has his owner changed to the specified Person
makePetsVocalize a string is returned with the name of each pet and their corresponding vocalization
makePetsFly all pets that fly should be made to fly.
movePet the pet with the specified name is moved by the specified distance.
petDies the Animal with the specified name is removed from the pets collection
Write the code for the system shown in the class diagram below and notes which follow. Animal Person IFI -name:String -position:int #agent +Animal(name:Strin +Person0 +Person(list:List
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
