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]
3 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]3 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
Naynar kis dhrm se sambandhit hai​
Inessa05 [86]

Answer:

Islam dharm se sabandhit

5 0
3 years ago
Read 2 more answers
Give four characteristics of hard disk​
Lubov Fominskaja [6]

Answer:

1. Mass Storage Devices

2. Available Storage Space

3. Data Access Performance

4. Device Form Factor and Connection

3 0
3 years ago
What is a cell address in xsl sheet
fgiga [73]

Answer:

cell address is the exact location of a particular cell of ms-excle

Explanation:

A1 refers to first row and first column.

A2 refers to second row first column.

i.e.

in 'A1' : 'A' indicate column { A= first column, B= second

column, C= third column. and soon.....}

'1' indicate row { 1 = first row, 2 = second row, 3= third row..... soon .......}

5 0
3 years ago
Which of the following is an example of an inline element? A. B. C. D.
____ [38]
what are the answers??
3 0
2 years ago
What color typically indicates the speaker port on a sound card?
allsm [11]
The answer to this question would be: Lime green

The lime green color code is for audio output for speaker or headphones. Color coding is greatly helpful to make sure that the port you are using is correct. Using the color you can determine what kind of input or output the port is for. There is a few others color coding like pink for analog microphone input, or light blue for audio input of analog line.
4 0
3 years ago
Read 2 more answers
Other questions:
  • If you are trying move a hard drive from a non-working computer to a working computer for the purposes of accessing the data on
    5·1 answer
  • You can access various sites on the WWW by using hyperlinks or by______. A. entering a key word for your search B. following dir
    12·2 answers
  • Mary from sales is asking about the plan to implement Salesforce.com's application. You explain to her that you are in the proce
    9·1 answer
  • Ivy is a student. She is looking for some freelance assignments during her vacation. Which of the following networking sites can
    9·1 answer
  • A ______ statement selects for execution a statement list having an associated label that corresponds to the value of an express
    15·1 answer
  • If you do not use the mini toolbar, it remains on the screen. _______________​ Group of answer choices True False
    8·1 answer
  • Why can't I register for Brainly?? I've been trying for months, too! I've noticed this question has been asked so many times, bu
    7·1 answer
  • How does abstraction help us write programs
    11·1 answer
  • Now that you have explored several different languages (Python, HTML, CSS, and JavaScript), what can you do to keep straight whi
    7·1 answer
  • Which of the following is the most significant result of technological innovation?
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!