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
Alexeev081 [22]
3 years ago
14

Insert the missing code in the following code fragment. This fragment is intended to call the Vehicle class's method. public cla

ss Vehicle { . . . public void setVehicleClass(double numberAxles) { . . . } } public class Motorcycle extends Vehicle { . . . public Motorcycle() { _______________; } }
Computers and Technology
1 answer:
gayaneshka [121]3 years ago
3 0

Answer:

The answer is D.

Explanation:

The question is incomplete, here is the full question;

Insert the missing code in the following code fragment. This fragment is intended to call the Vehicle class's method.

public class Vehicle

{

. . .

public void setVehicleClass(double numberAxles)

{

. . .

}

}

public class Motorcycle extends Vehicle

{

. . .

public Motorcycle()

{

_______________;

}

}

a) Motorcyle.setVehicleClass(2.0);

b) Vehicle.setVehicleClass(2.0);

c) this.setVehicleClass(2.0);

d) setVehicleClass(2.0);

According to the information and the code snippet given in the question, the correct answer to fill in the blank should be D,  setVehicleClass(2.0); because it is in the Motorcycle class which "extends" vehicle meaning that it's a subclass.

I hope this answer helps.

You might be interested in
What is better for a samsung tab a7 a 32 gb or 64
ad-work [718]

Answer:

I think 64 GB

Explanation:

64 GB would give you more ram and more storage which means you can get more apps or take more photos on there. 32 GB is good but you have to remember that system data takes up a significant amount of storage so you shouldn't get that. I'd say 64 GB would be the best.

5 0
3 years ago
Guess the output of this code:<br>print( (3**2)//2)​
tigry1 [53]

Answer:

hope it helps dear, please let me know! what is the question exactly....in words?good luck

4 0
3 years ago
Convert to octal. Convert to hexadecimal. Then convert both of your answers todecimal, and verify that they are the same.(a) 111
melomori [17]

The given decimal values are converted to octal and hexadecimal.

Explanation:

a. The converted octal value of 111010110001.0112 decimal number is  1473055755061.00557000643334272616

The converted hexadecimal value of 111010110001.0112 decimal number is  19D8B7DA31.02DE00D1B71758E21965

b. The converted octal value of 10110011101.112 decimal number is  113246503335.07126010142233513615

The converted hexadecimal value of  10110011101.112 decimal number is  

25A9A86DD.1CAC083126E978D4FDF4

a. while converting back from octal to decimal the value is 111010110001.01119999999999999989

b. while converting back from octal to decimal the value is

10110011101.11199999999999999973

Hence both the values changes while we convert from octal to decimal.

3 0
3 years ago
6.8 Code Practice<br> please can have some help please
babymother [125]
Sure what is the question though
7 0
3 years ago
According to popular science Web sites, the scientific process of digital forensics normally starts with a(n) ________.
neonofarm [45]

Answer:

a hypothesis that forms into a question.

Explanation:

5 0
3 years ago
Other questions:
  • Write a sentinel-controlled while loop that accumulates a set of integer test scores input by the user until negative 99 is ente
    8·1 answer
  • PLEASE HELP
    15·2 answers
  • A difference between crt monitors and flat-panel displays is that most flat-panel displays use digital signals to display images
    8·1 answer
  • A colleague asks you to research a CPU for a new server that will run Windows Server 2019. He explains the server roles that he
    7·1 answer
  • Which is the best practice for placing graphics on a slide?
    6·2 answers
  • Choose the web design factor from the drop-down menus that best represents each statement. A. Good web pages stick to the point,
    15·1 answer
  • When a bank account pays compound interest, it pays interest not only on the principal amount that was deposited into the accoun
    10·1 answer
  • What considerations should you make when deciding on the size of a table?
    9·1 answer
  • A(n) ________ software installation copies all the most commonly used files to your computer's hard drive.
    10·1 answer
  • Engineers use science to ______ things that people use.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!