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
You’ve been given a new cell phone with a 2 gigabyte data plan. You plan to use your phone for text messages, images, video, and
Katarina [22]

Answer:

IUYTR

Explanation:

5 0
3 years ago
I WILL MARK BRAINLIEST IF CORRECT!!!!!!!!!!!!!!!!!!!!!!!!!!!!
e-lub [12.9K]

the second answer is correct

7 0
3 years ago
Read 2 more answers
Some 3d printers work by controlling the exact locations where a liquid
kow [346]
Were a liquid what? id doesn't make any sense.
6 0
4 years ago
According to peacemaking criminology, our society denying a citizen's basic rights is another dimension of
katovenus [111]

Answer:

Violence.

Explanation:

Peacemaking criminology believes that our justice system it's just using a different form of violence to deal with violence.

This movement states that we need to re-enter violent individuals into society, and sees crime as a direct result of a determinate social structure, such as extreme poverty, violent environments, racial hate, etc.

4 0
3 years ago
Read 2 more answers
Which is the last line of defense in a physical security sense?
Deffense [45]

Answer: (A) People

Explanation:

 The physical security system is the basically used in the information system. It is used in the technical and the administrator element in the security system. This is the technology oriented system that is basically used to prevent from the hacking attacks in the system.

So, the people is the last statement of the defense in the physical security as the various security system is basically used by various people.

4 0
3 years ago
Other questions:
  • Max magnitude Write a method maxMagnitude() with two integer input parameters that returns the largest magnitude value. Use the
    13·1 answer
  • A STUDENT can take many COURSES and a COURSE can have more than one STUDENT enrolled in the course. In this case, both the "stud
    5·1 answer
  • What is a template class in c++?
    13·1 answer
  • Why is it important to have at least one backup stored off-site?
    8·1 answer
  • When Tim Berners-Lee developed the first specifications, protocols, and tools for the World Wide Web in 1993, his employers at C
    12·1 answer
  • What device connects a lan's switch to the next network? qizzlets?
    5·1 answer
  • Which area of study involves microeconomWhich area of study involves microeconomics? A. a nation's ability to meet consumer dema
    10·1 answer
  • Match the elements used in web searches to their functions.
    12·1 answer
  • How does the technology affect you daily living? Give situations where you use technology and how it helped you.​
    5·1 answer
  • As data travels further over a wavelength or frequency, what goes down?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!