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
If powerpoint is allowed to dominate a speech, it can divert attention from the speaker's message.
aev [14]
<span>The statement that if powerpoint is allowed to dominate a speech, it can divert attention from the speaker's message is true.
</span>
PowerPoint provides a common infrastructure, a template for the organization of speech, and for the logic of argumentation<span> and presentations should use both visual and verbal forms of presentation in order to dominate.</span>
3 0
3 years ago
How do you think your ability to work might be affected if you don’t magnify a document so that text is at a size for you to rea
max2010maxim [7]

Answer:

It will have a negative effect on the quality of your work for sure.

Without being able to properly and easily read the text, you will not be able to distinguish between symbols that are similar... like "," vs "." or ';' vs ":" or "m" vs "n" or "I" vs "i", and so on.

You might not be able to see where a sentence stops and you'll keep reading, mixing up sentences and wonder why this is in the same sentence.

If you're dealing with a language with accents (like French or Spanish for example), you will not be able to distinguish the accents ("ê" vs "ë" for example).

5 0
4 years ago
True or false? A medical assistant can check for available exam rooms and providers using an electronic scheduling system.
lutik1710 [3]
This is true m8 hope this helps
4 0
3 years ago
Print even numbers till 50 in python coding.
e-lub [12.9K]

In python, you can use a simple list comprehension to solve this problem.

print([x for x in range(51) if x % 2 == 0])

This code prints all the even numbers from 0 to 50 including 0 and 50.

4 0
3 years ago
In the digital signature technique when the whole message is signed using an asymmetric key, the sender of the message uses ____
rodikova [14]

In the digital signature technique when the whole message is signed using an asymmetric key, the sender of the message uses his or her own private key to sign the message.

8 0
2 years ago
Other questions:
  • Your friend is working on fixing their Homework assignment. They need a lot of help. You know all the bugs in the file, but due
    12·1 answer
  • The ____ statement is used to execute specific programming code if the evaluation of a conditional expression returns a value of
    10·1 answer
  • How to tell if screen or screen protector is cracked?
    5·2 answers
  • An attacker has obtained the user ID and password of a data center's backup operator and has gained access to a production syste
    12·1 answer
  • The following program segment is designed to compute the product of two nonnegative integers X and Y by accumulating the sum of
    9·1 answer
  • Different types of names given to explicit convertion in java<br>​
    6·1 answer
  • Give an example of a class and an example of an object. Describe what a class is, what an object is, and how they are related. U
    6·1 answer
  • Functions can accept any number of arguments.
    8·1 answer
  • a user reports that her computer monitor will not allow her to switch back and forth between Microsoft word and internet explore
    12·1 answer
  • Read the citation example, and then use the drop-down menus to identify each part.
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!