1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
dolphi86 [110]
3 years ago
15

Which of the following is true regarding the use of instance variable j in class B1?

Computers and Technology
1 answer:
melisa1 [442]3 years ago
6 0

Answer: A) It is directly accessible only in B1

Explanation: In the given chunk of code, Class B1 is a base class. Class B2 is derived class of class B1. Class B3 is derived class of B2. As you can see class B1 has two members or instance variables i and j. Instance variable cannot be directly accessible by both B2 and B3. If you see this statement of the given code  private int j; the keyword private is used with the variable j. This keyword is called access specifier. Access specifiers specifies how the members of a class can be accessed. These members are attributes and methods of that class. Any member of a class that are declared private cannot be inherited by derived classes of that class.  Additionally these private members cannot be accessed from within any method inside derived class. So j is directly accessible only in B1. You can access a private instance variable from within the same class or can access  it through the methods of class.

You might be interested in
25 POINTS HELP PLEASE IM TIMED
Studentka2010 [4]
Answer: b) implicit hth :)
8 0
3 years ago
1. Build and test D-type Flip-Flop using a built-in SR flip-flop.
GaryK [48]

Answer:

The attached files contain the realization of a D flip-flop from an RS flip-flop. It also contains the truth tables for both kinds of flip-flops

Explanation:

An SR flip flop is like a light switch. Set turns it 'on' and reset turns it 'off'

A D type flip-flop is a clocked flip-flop which has two stable states. A D type flip-flop operates with a delay in input by one clock cycle.

D type flip-flops are easily constructed from an SR flip-flop by simply connecting an inverter between the S and the R inputs so that the input to the inverter is connected to the S input and the output of the inverter is connected to the R input.

8 0
3 years ago
Suppose that we pick the following three tuples from a legal instance of a relation S (S has 100 tuples in total). Relation S ha
AysviL [449]

Answer:

The correct answer is BC → A, A does not hold over S. we noticed the tuples (1 ,2 ,3 ) and (4 ,2 ,3) which can hold over S)

Explanation:

Solution

No, since in this case the instance of S is provided. so such particular dependencies are unable to breach through such instance, but unable to tell which the dependencies hold towards S.

A functional dependency holds towards only when a relation forms a statement regarding the complete allowed instances of relation.

8 0
3 years ago
An array subscript can be an expression, but only as long as the expression evaluates to what type?
densk [106]

Integer Integer Integer Integer Integer Integer Integer Integer Integer Integer Integer Integer Integer Integer Integer

6 0
3 years ago
What will the following code display? #include using namespace std; void doSomething(int); int main() { int x{2}; cout <<
Leno4ka [110]

Answer:

The code will display the following on the screen:-

2

0

2

Explanation:

The output is like this because x{2} assigns the value 2 to the integer x.First the value of x is printed on the screen that is 2 and that newline is used to go to the next line.After that function is called doSomething with x passed as the argument. doSomething function assigns the value zero to the variable passed and prints it on the screen.So the next line is 0.Since x is passed by value so no changes will appear in the original argument.Hence the last line printed is 2.

8 0
2 years ago
Other questions:
  • Which of these statements regarding mobile games is true? A. They are typically played indoors. B. They have detailed environmen
    7·1 answer
  • Whats a computer scientist.
    5·2 answers
  • 1). What is the proper name of the healing agent?
    5·1 answer
  • What is technology?
    11·1 answer
  • Why is a high-quality bond typically considered a lower-risk investment than a stock
    10·2 answers
  • When solving a problem in a group situation, which of the following traits should be demonstrated?
    8·1 answer
  • Which of the following statements is true about the code used for software development?
    7·1 answer
  • 7.2.4 Area of Triangle HELP PLEASE!! (JAVA SCRIPT) I WILL WAIT FOR THE SOLUTION.
    12·1 answer
  • How does abstraction make programming languages easier to use
    15·1 answer
  • What is the significance of the scientific method?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!