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