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
Alchen [17]
2 years ago
14

Write an application for Cody’s Car Care Shop that shows a user a list of available services: oil change, tire rotation, battery

check, or brake inspection. Allow the user to enter a string that corresponds to one of the options, and display the option and its price as $25, $22, $15, or $5, accordingly. Display Invalid Entry if the user enters an invalid item.
Computers and Technology
1 answer:
Firdavs [7]2 years ago
3 0

An application for Cody’s Car Care:

#include <iostream>

#include <string>

#include <vector>

using namespace std;

int main()

{

vector<string>stroptions(4);

stroptions[0] = "Oil Change";

stroptions[1] = "Tire Rotation";

stroptions[2] = "Battery Check";

stroptions[3] = "Brake Inspection";

 

vector<int> intprices(4);

intprices[0] = 45;

intprices[1] = 22;

intprices[2] = 15;

intprices[3] = 10;

 

int option;

cout<< "Welcome to Joe's Car Care Shop!" <<endl;

cout<< "Choose a service from our menu:" <<endl;

for(int i = 1; i<= 4; i++)

{

  cout<< "#" <<i<< ": " <<stroptions[i-1] <<endl;

}

cout<< "Choice: ";

bool loop = true;

while(loop)

{

  loop = false;

  cin>> option;

 switch(option)

  {

   case 1:

     cout<< "\nA " <<stroptions[option-1] << " will be: $" <<intprices[option -1] <<endl;

     break;

   case 2:  

     cout<< "\nA " <<stroptions[option -1] << " will be: $" <<intprices[option -1] <<endl;

     break;

   case 3:

     cout<< "\nA " <<stroptions[option -1] << " will be: $" <<intprices[option -1] <<endl;

     break;

   case 4:

     cout<< "\nA " <<stroptions[option -1] <<" will be: $" << intprices[option -1] <<endl;

      break;

    default:

     cout<< "\nYou entered an invalid item! Try again!" <<endl;

     loop = true;

     break;

 }

}

}

You might be interested in
From the television industry's point of view, which of the following would be the most desirable viewer?
slava [35]
A 50-year-old African American man
4 0
3 years ago
PL I BEG YOU HELP
Murrr4er [49]

Answer:

Answers in explanation. Try to ask one question at a time, it is easier for people to answer single questions and you will get answers faster.

Explanation:

15. A

16. D

17. B + C

18. A+B+D

19. B+C+D

**20. is NOT Planned personal leave for documentation developers and proof readers. The other 4 answers are correct

21. Presentation notes + Outline

22.B

23.D (im not entirely sure about this one)    

8 0
3 years ago
Which of the following type of software is the most powerful for managing complex sets of data?
devlian [24]
Well i thinck the ancer is b
5 0
3 years ago
Read 2 more answers
Add the following methods to the ArrayCollection class, and create a test driver for each to show that they work correctly. In o
maks197457 [2]

Answer:

Attached are screenshots of the working code - baring in mind this only works on mutable Collection types. (ones that can be changed) if you use Collections that don't support this you may experience an Unsupported Operation Exception - but this is expected.

Explanation:

Using Java streams as an alternative for some answers.

3 0
3 years ago
Suppose you have data that should not be lost on disk failure, and the application is write-intensive. How would you store the d
natita [175]

Answer:

use RAID 5

Explanation:

The best option in this scenario would be to use RAID 5, this would all but eliminate the risk of losing the data. As you would need at atleast 3 seperate drives which would all act as backups for each other. Therefore, in the unlikely case that one of the drives were to fail or data were to become corrupt/lost the other drives would have a backup of that data which ca be used.

7 0
3 years ago
Other questions:
  • What is a drawback to being in Slide Show mode? a- Being able to review each slide in order
    8·2 answers
  • Sue conducted an experiment to determine which paper towel is the most absorbent among three different brands. She decides to pr
    15·1 answer
  • The java compiler requires that a source file use the ________ filename extension question 3 options: 1) .class 2) .h 3) .java
    8·1 answer
  • When powering off your computer is best down using?
    8·2 answers
  • Does any one play sniper clash 3d ??? ​
    9·2 answers
  • I wonder how world is created
    12·2 answers
  • Drag each label to the correct location on the image.
    10·1 answer
  • Perform depth-first search on each of the following graphs; whenever there's a choice of vertices, pick the one that is alphabet
    8·1 answer
  • O Why was the Internet originally constructed? Oto enable researchers to communicate
    6·2 answers
  • When and why would you use a prefab? <br> Subject video gaming
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!