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]
4 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]4 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
A chief Information Officer (CISO) is working with a consultant to perform a gap assessment prior to an upcoming audit. It is de
artcher [175]

Answer: (D) Vendor management plan

Explanation:

 The chief information officer (CISO) is basically explain about areas of the improvement to the vendors so that is why vendor management plan should be implemented to address the gap assessment in the upcoming audit.

Chief information officer basically managed all the report that are provided to the department of the audit on the monthly bases.

The vendor management are basically responsible for managing all the upcoming assessment in the audit in an organization.

8 0
3 years ago
When you first launch presentation software, how many blank slides will appear on your screen?
nataly862011 [7]

one, the title slide

6 0
3 years ago
Read 2 more answers
Consider the following code segment:
Leni [432]

The code segment is an illustration of loops and arrays

<h3>What is a loop?</h3>

A loop is a program statement used to perform repetitive operations

<h3>What is an array?</h3>

An array is a variable used to hold multiple values

<h3>How to analyze the program?</h3>

The loop of the program adds the index 0 elements of the first and the second row of the 2-dimensional array.

From the program, the numbers to add are 1 and 100

The sum of 1 and 100 is 101

Hence, 101 will be displayed when the code segment is executed

Read more about code segments at:

brainly.com/question/26683418

7 0
2 years ago
The main advantage of using the Gray code is:
zzz [600]

Answer:

a) only one digit changes as the number increases.

Explanation:

Let us first understand what does it mean when we say only one digit changes as the number increases using the Reflected Binary code (also called Gray code)

consider the 4 bit representation of Binary coded decimal and RB codes

Decimal | Binary code  | Reflected binary (RB) code

0              0000               0000

1               0001                0001

2              0010                0011

3              0011                 0010

4              0100                0110

5              0101                 0111

As you can see in the case of binary codes, there are more than one digit changes between two consecutive numbers.

But notice that in the case of Gray codes, there is always one digit change between two consecutive numbers.

The problem with the binary codes is that the more digits change there states the greater is the chance of ending up with random transitional values rather than real values which can be incorrect. The RB code solves this problem by only changing one digit at a time.

The RB code is widely used in linear and rotary encoders, error correction and digital logic design.

8 0
3 years ago
Where on a computer is the operating system generally stored?
Brilliant_brown [7]

The operating system on a computer is generally stored at hard disk.

4 0
3 years ago
Other questions:
  • To type the letter address, _________ space from the dateline
    9·2 answers
  • The design activity key question, "how will this system interact with other systems..." is part of which design activity?​
    7·1 answer
  • What is the benefit to having the user interface integrated into the operating system? a) Power users prefer the added flexibili
    13·1 answer
  • When communicating with a server on another subnet, which of the following settings is used to determine which direction it need
    6·1 answer
  • You want to centrally back up the files users store in the Documents folder in their user profiles, but you don’t want users to
    7·1 answer
  • Online retailer Amazon relies heavily on a hierarchy culture to manage its vast and complex shipping processes. ___________ are
    11·1 answer
  • In this problem, you will fill in the code for a function count_digits(val) that takes a positive integer, val, and returns a li
    12·1 answer
  • If a variable uses more than one byte of memory, for pointer purposes its address is: Group of answer choices the address of the
    12·1 answer
  • How many lines of text are in your questionnaire document
    5·1 answer
  • If David wishes to digitally sign the message that he is sending Mike, what key would he use to create the digital signature
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!