Suppose you have the following class:
class Second
{ private int x;
public int z;
public int sum() {
return x + y +Z
} // end sum
private void reset(int a, int b, int c) {
x = a; y = b; c = z;
} // end reset
public boolean check(float x) { return x<0;
} // end check
} // end Second
Given the following declaration,
Second myClass = new Second();
indicate for each statement (which might appear in testing code)if it is legal or illegal (will cause an error).
a. myClass.x = 5;
b. myClass.z = 5;
c. myClass.sum(x);
d. int ans = myClass.sum();
e. myClass.reset(1, 2, 3);
f. boolean x = myClass .check(11.2) ;
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.