Answered step by step
Verified Expert Solution
Question
1 Approved Answer
We create the interface Foundobject with the sole purpose to denote the objects of specific type, so we can put them in the same array.
We create the interface Foundobject with the sole purpose to denote the objects of specific type, so we can put them in the same array. We create the Edible interface to mark which objects can be eaten. Now, we will define the objects we find in the woods fruit and stones. When we create the two objects (fruit and stone) we put implements Foundobject in the class declaration for all of them, and the one we can eat also implement the Edible interface. Write the Stone class in the answer box below assuming that the interfaces and the Fruit class have been done for you For example: Test Result Stone s = new Stone("Stone"); | Stone System.out.println(s)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started