Question: in Java language please best regards. Animal class o METHODS: Animal(eyeColor : string,weight : int,age : int): constructor Note: cannot be an object from this

in Java language please
best regards.
in Java language please best regards. Animal class o METHODS: Animal(eyeColor :
Animal class
o METHODS:
Animal(eyeColor : string,weight : int,age : int): constructor
Note: cannot be an object from this class.
Fish class
o METHODS:
Fish(eyeColor : string,weight : int,age : int,bodyType : string): constructor.
getBodyType() : getter for attribute bodyType.
setBodyType(bodyType : string) : setter for attribute bodyType.
calculateFoodCost() :
Food Cost= Age * Weight
Lion class
o METHODS:
Lion(eyeColor : string,weight : int,age : int): constructor.
calculateFoodCost() :
Food Cost= Age * Weight + 20
Zoo class
o METHODS:
Zoo(name : string): constructor.
addAnimal(a : Animal) : this method adds an animal a to the zoo. It returns true if done.
False otherwise.
Note: An Animal can be Fish or Lion.
countLion( n : double) : count the number of Lion in the zoo with Food Cost less or
equal to n.

Fish class - MirthoDs: - getBedy Tyeg z gener for antribue Aody-TyPr. - senbody TypribodyT Tye : saringe : sether for athntuat Aody Typr. - celculatefadeand? : Food Case Age + Weightr L. Lem fleor - METHODS: - LiandacCelar z stringswighe z iat,ege z indes condatuctur. - celculatef eadCenny z Food Cont- Ape " Wicight +20 Zoe cless - Mitholas: - Zep/meme z strieged cohstructor. - dald Amimale : Amimab ; this methed adds an animal a lo the ros, It rerums trae if done. False otherwise. Noter Ant Animal can be Fith or Lion. equal bo an

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!