Question: Please help!!! interface SecretInterface{ public void myMethod2(int x); public void myMethod2(double x); } I don't know why this is wrong class Class1 implements SecretInterface {

Please help!!! interface SecretInterface{ public void myMethod2(int x); public void myMethod2(double x);} I don't know why this is wrong class Class1 implements SecretInterfacePlease help!!!

interface SecretInterface{ public void myMethod2(int x); public void myMethod2(double x);

}

I don't know why this is wrong

class Class1 implements SecretInterface { // instance variable private int x = 0; // constructor public Class1(int x) { this.x = x; // instance methods public double myMethod1 (double x, double y) { return X - y public void myMethod2(int x) { System.out.println(x); public String myMethod3(String x) { return "hi " + x; We have also written the following Class2 class: class Class2 implements SecretInterface { // instance variable private int x = 1: // constructor public Class2(int x) { this.x = x; // instance methods public double myMethod1(double a, double b) { return a + b; public void myMethod2 (double x) { System.out.println(x); public String myMethod(Object o) { return "hello"; TASK: Write the SecretInterface interface such that it contains the most possible attributes/methods possible given the implementations of Class 1 and Class2 above

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!