Question: IN JAVA 4 Implement a Food class that inherits from Item It should contain the following PRIVATE data: It should have the following PUBLIC methods:

IN JAVA
4 Implement a Food class that inherits from Item It should contain the following PRIVATE data: It should have the following PUBLIC methods: Constructor that takes name, weight, and heals (in that order) Getter method: double getHeals0 Page 3 of String toString) Override toString) to return super.toString)heals: Example: if name- "Cheese", weight- 3, and heals-20: Name: Cheese Weight: 3 Healing Power: 20
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
