Question: Create a method nicestFish that takes in two fish as parameters, compares the friendliness level of two fish, and returns the fish with the higher
Create a method nicestFish that takes in two fish as parameters, compares the friendliness level of two fish, and returns the fish with the higher friendliness. Test this method with the fish defined in problem 6. (Friendliness scale: 1 mean, 2 not friendly, 3 neutral, 4 friendly, 5 very friendly) Hint: fishName.getFriendliness() gives you the integer number of the friendliness of fishName. You have already created getFriendliness() in problem 5.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
