Question: JAVA :) Interface I { public abstract int yes(int b); } Abstract class A implements I{ public int w; public int x; public abstract int

JAVA :)

Interface I {

public abstract int yes(int b);

}

Abstract class A implements I{

public int w;

public int x;

public abstract int go();

public int yes(int b){

return (w*b( + x;

}

}

class B extends A{

public int y;

public int z;

public int go(){

return y * 10;

}

}

class C implements I {

public int c ;

public int yes ( int b ) {

return b + c;

}

}

BASED ON THE CLASS ABOVE CODE, ANSWER TRUE OR FALSE FOR THE QUESTIONS AND A BRIEF EXPLANATION

a) B objects may be used at type I

b) how many instance variables does a B object have (which ones are they)

c) no parent class exsists for C

d) in class B the three expressions x, this.x, and super.x all access the same variable

e) class B is not allowed to @override the yes method

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!