Question: You have a class Bear as defined in the class diagram below. Here is an instance of Bear that was created in a separate test

You have a class Bear as defined in the class diagram below. Here is an instance of Bear that was created in a separate test class: Bear bear1 - new Bear) Bear - weight: int + getWeight (): int + setWeight (w int) +eat () + hibemate () Write a Java statement that makes bear1 eat. . Assume that bear! increased his weight by 10%. Update the value of the field weight so that it reflects the current weight of the bear
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
