Question: Consider the following code: public interface Vocaloid { void applyFilter ( Filter f ) ; void sing ( ) ; void adlib ( ) ;

Consider the following code:
public interface Vocaloid {
void applyFilter(Filter f);
void sing();
void adlib();
void callAndResponse();
}
public class HatsuneMiku implements Vocaloid {
void applyFilter(Filter f){
filter.apply(this);
}
void sing(){
}
System.out.println("Hatsune Miku sings");
String adlib(int seed){
System.out.println("Hatsune Miku adlibs with seed "+ seed);
}
void callAndResponse(){
System.out.println("Miku calls for a response");
}
}
Which method does need to implement in order to compile?
void adlib()
String toString()
boolean equals()
The class
compiles without any changes.
 Consider the following code: public interface Vocaloid { void applyFilter(Filter f);

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!