Question: java code Question 4: Interfaces (10 points) Create a Java Project called InterfaceDemo and do the following: - Lecture slides show an example of Edible

java code
java code Question 4: Interfaces (10 points) Create a Java Project called

Question 4: Interfaces (10 points) Create a Java Project called "InterfaceDemo" and do the following: - Lecture slides show an example of Edible Interface. Create the same interface inside your Java Project. - Additionally create a default method of your choice to the "Edible" interface. - Create a Java class called "Vegetable" and two child classes for this class- "Broccoli" and "Potato" inside this class, - Implement the "Edible" interface for the parent class "Vegetable" and then implement the interface methods accordingly. - Create an object for each of the classes and call the interface method using the objects respectively

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!