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
tatyana61 [14]
4 years ago
14

If a base class pointer, p, points to a derived class instance, and both base and derived classes have a method void doIt() whic

h takes no parameters, then p->doIt() will invoke the derived class version:__________
a. only if both the base class method and the derived class method are declared virtual.
b. if the derived class method is declared virtual, but the base is not declared virtual.
c. if the base class method is declared virtual, even if the derived class method is not declared virtual.
Computers and Technology
1 answer:
Luden [163]4 years ago
4 0

Answer:

a. only if both the base class method and the derived class method are declared virtual.

Explanation:

The parameters will invoke derived class version, because objected pointed to determine which method is called. The base and derived class are declared virtual Overriding feature allows subclass and derived class to provide implementation.

You might be interested in
Gross Domestic Product (GDP) is the economic report card for any country. What is the report card measuring?
GalinKa [24]
The answer is production.



6 0
4 years ago
List 10 programs or applications on your computer other than any Microsoft office programs
Fofino [41]
Dropbox
Mozilla Firefox, Google Chrome
Gmail, Mozilla Thunderbird
CDburnerXP
Putty, Netflix,
Paint.net, Filezilla
3 0
3 years ago
Write a program to help a travelling sales person keep up with their daily mileage driven for business. In your main method, the
Lelu [443]

Answer:

The programming language is not stated;

<em>The program written in C++ is as follows (See Explanation Section for detailed explanation);</em>

#include<iostream>

using namespace std;

int main()

{

 int numdays;

 cout<<"Number of days of mileage: ";

 cin>>numdays;

 int miles[numdays];

for(int i=0;i<numdays;i++)

{

 cout<<"Miles traveled on day "<<i+1<<": ";

 cin>>miles[i];

}

 int total = 0;

 for(int i=0;i<numdays;i++)

{

 total+=miles[i];

}

cout<<"Total mileage traveled: "<<total;

 return 0;

}

Explanation:

This line declares the number of days of mileage

 int numdays;

This line prompts user for days of mileage

 cout<<"Number of days of mileage: ";

This line accepts input from the traveler for days of mileage

 cin>>numdays;

This line creates an array

 int miles[numdays];

The italicized is an iteration that collects the user input for each day

<em> for(int i=0;i<numdays;i++)</em>

<em> {</em>

<em>  cout<<"Miles traveled on day "<<i+1<<": ";</em>

<em>  cin>>miles[i];</em>

<em> }</em>

This line initializes variable to 0

 int total = 0;

The italicized is an iteration that adds up the mileage traveled by the traveler each day  

<em>  for(int i=0;i<numdays;i++)</em>

<em> {</em>

<em>  total+=miles[i];</em>

<em> }</em>

This line prints the total miles traveled

cout<<"Total mileage traveled: "<<total;

5 0
4 years ago
Assume that the classes listed in the Java Quick Reference have been imported where appropriate.
Georgia [21]

rcre2nvijrnv

u1bcihdebc

nn

8 0
4 years ago
When you think of computers, I want you to think:
jekas [21]

Answer:

Explanation:

When I think about computers, I can understand about the software and the hardware, we can touch the hardware, but the software don't because is only data stored in the hardware, we can interact with the stored data using the hardware, we can complete a system with data, software, hardware, and people, people try to learn about software because it is better paid than fix a hardware.

5 0
3 years ago
Other questions:
  • Candace opened an email from a person she didn't know and clicked on a pop-up in the email that installed a virus on her compute
    8·2 answers
  • Name format Many documents use a specific format for a person's name. Write a program whose input is: firstName middleName lastN
    14·2 answers
  • The physical components of a computer are called what?
    8·1 answer
  • Kerry wants to save her file but give it a new name. Kerry should use the ____ command
    7·1 answer
  • What is the unofficial name given to the culture that has emerged from living in the age of digital media, whereby people are fr
    7·2 answers
  • The processor of a computer communicates to the other parts of the computer through a code that consists of what?
    9·1 answer
  • The challenge of preparing for ____________________ is in ensuring that employees do not feel that they are being prepared for t
    7·1 answer
  • Algorithms can be created in all the following ways EXCEPT:
    10·1 answer
  • Free poi nts here you go
    5·1 answer
  • What are the importance of rules in the computer lab ?​
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!