subject

Consider the following code:

public class b1
{
private int i;
private int j;

}
public class b2 extends b1
{
private int m;
private int n;

}
public class b3 extends b2
{
private int z;

}

which of the following sets of instance variables are directly accessible in class b2? (2 points)

1) i, j, m, n, z
2) i, j, m, n
3) i, m, n
4) m, n
5) z

Answers

ansver
Answer from: kayleeemerson77

4. m, n

Explanation:

Public variables are those variables that are accessible to every class or function in the program.

Private variables are variables that are accessible to only specific classes or functions in the code.

The integers i, j, m, n, z are private variables that can only be accessible to the classes in which they were declared.

For class B2, the private variables declared in it are the integers i and j. Those are the only variables that can be directly accessed by it.

ansver
Answer from: Quest

answei'm sorry. i am having trouble understanding what you're asking? i'm willing to but tell me what you mean : )

explanation:

ansver
Answer from: Quest

answer; certification; plz check first, i believe this is correct. good luck;

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 18:10, AdoNice
How can i delete permalinks from a word press site?
Answers: 1
image
Computers and Technology, 23.06.2019 17:10, madams4450
Ac++an of of pi. in , pi is by : pi = 4 – 4/3 + 4/5 – 4/7 + 4/9 - 4/11 + 4/13 - 4/15 + 4/17 . ., to pi (9 ). , if 5 to pi, be as : pi = 4 - 4/3 + 4/5 - 4/7 + 4/9 = 4 – 1. + 0.8 - 0. + 0. = 3.. atoofbe to pi?
Answers: 2
image
Computers and Technology, 24.06.2019 11:20, brittanybyers122
Print "censored" if userinput contains the word "darn", else print userinput. end with newline. ex: if userinput is "that darn cat.", then output is: censoredex: if userinput is "dang, that was scary! ", then output is: dang, that was scary! note: if the submitted code has an out-of-range access, the system will stop running the code after a few seconds, and report "program end never reached." the system doesn't print the test case that caused the reported message.#include #include using namespace std; int main() {string userinput; getline(cin, userinput); int ispresent = userinput. find("darn"); if (ispresent > 0){cout < < "censored" < < endl; /* your solution goes here */return 0; }
Answers: 3
image
Computers and Technology, 24.06.2019 13:20, ana9340
3. ranga ramasesh is the operations manager for a firm that is trying to decide which one of four countries it should research for possible outsourcing providers. the first step is to select a country based on cultural risk factors, which are critical to eventual business success with the provider. ranga has reviewed outsourcing provider directories and found that the four countries in the table that follows have an ample number of providers from which they can choose. to aid in the country selection step, he has enlisted the aid of a cultural expert, john wang, who has provided ratings of the various criteria in the table. the resulting ratings are on a 1 to 10 scale, where 1 is a low risk and 10 is a high risk. john has also determined six criteria weightins: trust, with a weight of 0.3; quality, with 0.2; religious, with 0.1; individualism, with 0.2; time, with 0.1; and uncertainity, with 0.1. using the factor-rating method, which country should ranga select? why? (2 points)
Answers: 3
You know the right answer?
Consider the following code:

public class b1
{
private int i;
privat...