Question & Answer: abstract class test1 {…..

Question 2;

Consider the following class:

abstract class test1 {

static int x;

}

and following interfaces:

public interface it1 {

public int geta1();

}

public interface it2 {

public void seta1(int x);

}

Implement the two interfaces it1 and it2 such that they each can modify the value of x in same object. You should write complete class with main (including any additional classes that may be needed) to accomplish this task.

Expert Answer

 

Question & Answer: abstract class test1 {..... 1

Still stressed from student homework?
Get quality assistance from academic writers!