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


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
Get step-by-step solutions from verified subject matter experts
