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
gavmur [86]
3 years ago
5

Suppose a class Car and its subclass Honda both have a method called speed as part of the class definition. rentalH refers to an

object of the type Honda and the following statements are found in the code: rentalh.cost(); super.speed(); what will the first statement do?
A. Nothing will be called since the code will not compile as a result of multiple definitions of speed.
B. The cost method in Car will be called.
C. The cost method in Honda will be called.
D. Overloading will be used to determine which cost method to use.
Computers and Technology
1 answer:
Westkost [7]3 years ago
6 0

Answer:

C. The cost method in Honda will be called.

Explanation:

The first statement will cause the cost method in Honda to be called. This is because rentalh is a object of the subclass Honda. Therefore, any method that is called using this object variable will target the elements within the Honda subclass. In this case, the cost() method is being called using the rentalh variable which will look for the cost() method within the scope of the Honda subclass. In order to target the parent class Car it would need to be called using the super variable as in statement 2.

You might be interested in
Which filter lets you improve an image's appearance by manipulating the look and depth of its surface?
serg [7]

Answer:

A

Explanation:

5 0
4 years ago
Read 2 more answers
Finish the sentence. If the IP address and MAC address are parameters of layer 3 and layer 2, respectively, a port number is a p
stepan [7]

Answer:

Layer 4

Explanation:

MAC address works at the data link layer (layer 2) of the OSI model. Mac address allows computers to uniquely identify themselves in the network

IP Address is a logical address that works at the network layer of OSI model (layer 3) (actually the IP layer of TCP/IP model).

The port number works at the transport layer of the OSI model (layer 4).The port number uses sequence number to send segments to the correct application thereby ensuring they arrive in the correct order.

7 0
3 years ago
How do i add an answer on brainly i click to add an answer and it sends me to the home page
cricket20 [7]

Answer:  try to just add as little as possible then add the answser or just reload your browser

Explanation:

7 0
3 years ago
Where would you look to find an article on recent fashion trends?
Zina [86]
The answer is letter A. 

Who's Who Fashion Articles showcase trends in fashion and the latest brands in the fashion industry. You can look up articles about fashion and the possible merchandises that would spice up your fashion ideas from their website or print materials.
8 0
3 years ago
Gabriel's sister called him about a message that suddenly appeared on her screen that says her software license has expired and
BabaBlast [244]

Answer:

Blocking ransomware

Explanation:

A ransomware is a malware that acts by encrypting the files of a victim after which the attacker demands for a ransom payment to be made by the victim before access is restored through the provision of a key to decrypt the encrypted files

There are different types of ransomware such as blockers, wipers and cryptors

A blocker ransomware is one that blocks access to the files stored on a computer or device by encrypting them and usually displaying a demand for payment message that comes up in front of the all opened windows

5 0
3 years ago
Other questions:
  • Your friend, Isabella, is having difficulties remembering the names of different buttons on the Ribbon. Which of the following f
    6·1 answer
  • Discuss your theory on why the light bulbs in the combination circuit have different brightness.
    6·1 answer
  • What type of socket should be used with an air impact wrench
    12·1 answer
  • What type of interview would be most likely for the following scenario?
    11·2 answers
  • which software is used to mimic intricate hand drawings into digital paintings? _____ is used to replicate hand drawings into di
    7·1 answer
  • You're the network administrator for a company that has just expanded from one floor to two floors of a large building, and the
    13·1 answer
  • E-What is the important of Recycle bin?<br>Ans:​
    12·1 answer
  • 3.1.14 Wormhole CodeHS <br><br> May I have it in a copy and paste, please?
    5·1 answer
  • Select the items below that are examples of things that could use the smart card technology.
    7·1 answer
  • What is the address space of a computer with a 64-bit address bus?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!