Question: I want Java code for this question 6. Create an interface called Characteristic that has two methods likes(), says(). Create a class called Pet that

I want Java code for this question
6. Create an interface called Characteristic that has two methods likes(), says(). Create a class called Pet that implements the above interface, and has two private data members name and food of string type. Do not define the interface methods in Pet. Write a 2- argument constructor to assign values to its data members. Write 2 member functions to return the name, and food values respectively. Derive a class called Dog from the Pet class that includes a data member favorite_activity. Write a 3-argument constructor to initialize values. Implement the likes() function to display the message in the following format:
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
