Question: in Java Final Lab Animal class - METHODS: - Animal(eyeColor : string, weight : int,age : int): constructor Note: cannot be an object from this

in Java

in Java Final Lab Animal class - METHODS: - Animal(eyeColor : string,weight : int,age : int): constructor Note: cannot be an object from

Final Lab Animal class - METHODS: - Animal(eyeColor : string, weight : int,age : int): constructor Note: cannot be an object from this class. Fish class - METHODS: - Fish(eyeColor : string,weight : int,age : int,bodyType : string): constructor. - getBodyType0 : getter for attribute bodyType. - setBodyType(bodyType : string) : setter for attribute bodyType. - calculateFoodCost 0 : Food Cost = Age Weight Lion class - METHODS: - Lion(eyeColor : string, weight : int,age : int): constructor. - calculateFoodCost() : Food Cost = Age Weight +20 Zoo class - 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

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!