Question 2;
Consider the following class:
Don't use plagiarized sources. Get Your Custom Essay on
Question & Answer: abstract class test1 {…..
GET AN ESSAY WRITTEN FOR YOU FROM AS LOW AS $13/PAGE
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