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
gtnhenbr [62]
3 years ago
12

Assume that you have created a class named DemoCar. Within the Main() method of this class, you instantiate a Car object named m

yCar and the following statement executes correctly: WriteLine("The Car gets {0} miles per gallon", myCar.ComputeMpg()); Within the Car class, the ComputeMpg() method can be _________. Group of answer choices
Computers and Technology
1 answer:
marysya [2.9K]3 years ago
5 0

Answer:

It can be static, but it shouldn't, given the way it is invoked.

It can also be protected but <u>not</u> private.

Explanation:

The question is confusing, since the ComputeMpg() should be a public non-static member. Also, is this Java or C#?

You might be interested in
How can we get the number of records or rows in a table using MySQL? *
luda_lava [24]

The number of records or rows in a table using MySQL can be got by using the COUNT statement.

Explanation:

  • To counts all of the rows in a table, whether they contain NULL values or not, use COUNT
  • That form of the COUNT() function basically returns the number of rows in a result set returned by a SELECT statement
  • The SQL COUNT() function returns the number of rows in a table satisfying the criteria specified in the WHERE clause.
  • It sets the number of rows or non NULL column values.
  • COUNT() returns 0 if there were no matching rows.
  • The SQL COUNT function is an aggregate function that returns the number of rows returned by a query. You can use the COUNT function in the SELECT statement to get the number of employees, the number of employees in each department, the number of employees who hold a specific job, etc.
3 0
3 years ago
What is fruit nursery?​
Natasha2012 [34]
A place where young plants are produced through different ways is a nursery. The main work of nursery is to supply young plants and seeds for cultivation purposes for both fruits and vegetables. ... An appropriate environment for germination of seed. The nursery is also very useful for purpose of vegetation propagation.
7 0
3 years ago
Read 2 more answers
Write a program that asks the user to enter a number within the range of 1 through 10. Use a switch statement to display the Rom
Studentka2010 [4]

Answer:

// program in C++.

// headers

#include <bits/stdc++.h>

using namespace std;

// main function

int main()

{

// Variable

   int num;

   cout << "Enter a number between 1 and 10: ";

   // read input

   cin >> num;

   // validate input number

   while(num<1||num>10)

   {

   // if input is wrong then print error message

       cout<<"Wrong input!!Enter again:";

       // read again

       cin>>num;

   }

   // print output

   cout << "The Roman numeral for "<<num<<" is:";

   // switch

   switch (num)

   {

       case 1:

       // if input is 1

           cout<<"I"<<endl;

           // exit the switch

           break;

       case 2:

       // if input is 2

           cout<<"II"<<endl;

           // exit the switch

           break;

       case 3:

       // if input is 3

           cout<<"III"<<endl;

           // exit the switch

           break;

       case 4:

       // if input is 4

           cout<<"IV"<<endl;

           // exit the switch

           break;

       case 5:

       // if input is 5

           cout<<"V"<<endl;

           // exit the switch

           break;

       case 6:

       // if input is 6

           cout<<"VI"<<endl;

           // exit the switch

           break;

       case 7:

       // if input is 7

           cout<<"VII"<<endl;

           // exit the switch

           break;

       case 8:

       // if input is 8

           cout<<"VIII"<<endl;

           // exit the switch

           break;

       case 9:

       // if input is 9

           cout<<"IX"<<endl;

           // exit the switch

           break;

       case 10:

       // if input is 10

           cout<<"X"<<endl;

           // exit the switch

           break;

         // default

       default:

           break;

   }

return 0;

}

Explanation:

Read a number from usr and assign it to variable "num". If the input number is less than 1 or greater than 10 then ask again to enter a number until user  enter a number between 1-10 only.Then with the help of switch() function print  the equivalent Roman number.

Output:

Enter a number between 1 and 10: -5                                                                                        

Wrong input!!Enter again:12                                                                                                

Wrong input!!Enter again:6                                                                                                

The Roman numeral for 6 is:VI

7 0
3 years ago
One of the benefits of conditional ____________________ is that it helps you analyze data by highlighting significant trends in
Lelu [443]

Answer is Formatting

When conditional formatting is applied to your data, you can quickly and easily identify variances in different values within a quick glance. This makes worksheets easier to comprehend. With conditional formatting, you are able to apply formatting such as icons, data bars, and colors.

 

 

 






5 0
4 years ago
Which excel feature makes it easy to copy and paste formulas in multiple cells?.
timama [110]

Answer:

Ctrl + R - Copy a formula from the cell to the left and adjusts the cell references. For example, if you have a formula in cell A2 and you want to copy it to cell B2, select B2 and press Ctrl + R. Tip. Both of the above shortcuts can be used to copy formulas to multiple cells too.

Explanation:

8 0
2 years ago
Other questions:
  • Assume that to_the_power_of is a function that expects two int parameters and returns the value of the first parameter raised to
    11·1 answer
  • Operating systems that have windows and icons have which type of user interface?
    15·1 answer
  • What is the purpose of an exhaust emission system
    6·1 answer
  • What specific type of DNS query instructs a DNS server to process the query until the server replies with an address that satisf
    5·1 answer
  • If you are asked to list your favorite websites in no particular order, you are relying on
    8·1 answer
  • Name three output devices
    6·1 answer
  • Which programming language represents data in the form of a series of zeros and ones​
    7·1 answer
  • You want to copy data from one cell or range to an adjacent cell or range in your spreadsheet, without using a shortcut key. Whi
    10·1 answer
  • Click this link to view O*NET's Skills section for Biomedical Engineers. Note that common skills are listed toward the top and l
    8·2 answers
  • (05.01 MC)
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!