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
BigorU [14]
3 years ago
6

Consider the classes below, declared in the same file: class A { int a; public A() { ​ a = 7; } } class B extends A { int b; pub

lic B() { ​ b = 8; } } Which of the statements below is false? Group of answer choices After the constructor for class B executes, the variable a will have the value 7. A reference of type A can be treated as a reference of type B. Both variables a and b are instance variables. After the constructor for class B executes, the variable b will have the value 8.
Computers and Technology
1 answer:
DiKsa [7]3 years ago
4 0

Answer:

2. <em>A reference of type A can be treated as a reference of type B</em> - False

Base class or its objects are not related to their derived class (or its objects).

Explanation:

class A {

   int a;

   public A() {

       a = 7;

   }

}

class B extends A {

   int b;

   public B() {

       b = 8;

   }

}

///////////////////////////////////////////////////////////////////////////////////////////////////////

1. <em>After the constructor for class B executes, the variable a will have the value 7 </em>- True.

When an object of a derived class is declared, the constructor of base class is called before the constructor of derived class (is called).

3. <em>Both variables a and b are instance variables </em>- True.

Classes can have instance, or member, variables and methods.

4.<em> After the constructor for class B executes, the variable b will have the value 8</em> - True.

When object of class B is declared, its constructor was called, which initialized variable b to 8.

You might be interested in
If your TV was showing a flat black or blue screen, or had "snow", what steps would you take to fix it?
ladessa [460]

Answer:

Assuming that TV was working fine and it stopped working when you restart or after power shutdown. Flat Black or blue screen or snow are all seems to be having HDMI cable sync issues. It can be fixed based on the model of the TV and connectivity it is using.

I would suggest to start with very basic step and should go step by step unless we narrow down the problem.

  1. <em>Turn off all the components, unplug the cables and plug them back by leaving HDMI cables intact. So this process will reset all the units and may help in renegotiation.</em>
  2. <em>Plug all the cables and Turn on the TV.  Plug all other components like sound receiver and source device and Turn on the power.  This may solve the problem.</em>
  3. <em>If issue still persist. Unplug and Plug back HDMI cables and surrounding components in HDMI path. It may solve the issue.</em>
  4. <em>If the issue still persists, then change the HDMI cable itself and try rebooting all components.</em>
  5. <em>If input is changed then it might have caused the issue. So identify the cable from the receiver to the TV.  figure out its input and change the TV input to that value and it will work.</em>
  6. <em>In some TV's if power reset happens, It may revert to TV mode then change the video input based on your TV model.</em>
  7. <em>If the receiver is connected to TV via Coax then change the channel as per TV guide.</em>
  8. <em>If the receiver and its component is using AV or HDMI then use TV remote to change the input source until correct feed is found.</em>
  9. <em>If issue still persist, check the cable with another TV and see if it works. If its not then cable is at fault.</em>
  10. <em>If the cable is fine then change the TV and try above steps.If it works then TV is at fault.</em>

Explanation:

7 0
3 years ago
susan wrote the recursive formula for the sequence represented by the exploit formula An=3+2n. put an C net to any correct state
omeli [17]

The recursive formula of the explicit formula A_n = 3 + 2n is A_n = A_{n-1} + 2

The explicit formula is given as:

A_n = 3 + 2n

When n = 1, we have:

A_1 = 3 + 2(1)

A_1 = 5

When n = 2, we have:

A_2 = 3 + 2(2)

A_2 = 7

When n = 3, we have:

A_3 = 3 + 2(3)

A_3 = 9

So, we have:

A_1 = 5

A_2 = 7

A_3 = 9

Rewrite the functions as follows:

A_1 = 5

A_2 = 5 + 2

A_3 = 7 + 2

So, we have:

A_1 = 5

A_2 = A_1 + 2

A_3 = A_2 + 2

Express 2 as 3 - 1

A_3 = A_{3-1} + 2\\

Substitute n for 3

A_n = A_{n-1} + 2

Hence, the recursive formula is A_n = A_{n-1} + 2

Read more about recursive and explicit formulas at:

brainly.com/question/11235928

7 0
3 years ago
A gui allows you to interact with objects on the screen such as icons and buttons true or false
Alja [10]

Answer:

True

Explanation:

7 0
2 years ago
Yuri, a medical assistant, has been asked to send an account of a patient's last office visit to another doctor's office. The te
g100num [7]
The internet,,

To let the other doctor know about specific details on the patient, and other excessive information.

Hope this helps!! :)
6 0
3 years ago
Read 2 more answers
When you are almost done with your soup and want to get at the last little bit, how should you do this 2
pav-90 [236]

Answer:

<u>B. Tip the bowl slightly, then spoon up the last bit</u>

Explanation:

Generally speaking none of the other answers made much of sense.. "tip the bowl from side to side" doesn't help you at all, neither does "Keep spooning as much as you can, then stop eating". Neither of these will help you spoon up the last little bit, <u>the most logical answer is B. "Tip the bowl slightly, then spoon up the last bit"</u>. If this is not the correct answer then it'd be D, but I don't believe/feel that it's "poor etiquette" to "leave the last little bit".

7 0
3 years ago
Other questions:
  • Describe how to manage the workspace by putting each feature under the action it helps carry out
    8·1 answer
  • Which of the following pathways relates to the Architecture and construction career cluster
    7·1 answer
  • What are the principal cybersecurity threats, both internal and external, and the principal safeguards that have been developed
    13·1 answer
  • What kind of energy transformation occurs in a gasoline-powered car?
    14·1 answer
  • What lets you do many things, like write book reports and stories?
    15·1 answer
  • In the code segment below, assume that the int variable n has been properly declared and initialized. The code segment is intend
    5·1 answer
  • Similarities between inline css and internal css​
    6·1 answer
  • Write a method named printGPA that takes in as a parameter a Scanner to read in user input, and calculates a student's grade poi
    8·1 answer
  • Setting up a desktop computer for anAutoCADspecialist who needs a minimum of 125 GBram which operating system would be the best
    5·1 answer
  • Question 9
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!