Ask Question
26 May, 03:44

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.

+1
Answers (1)
  1. 26 May, 06:39
    0
    An application for Cody's Car Care:

    #include

    #include

    #include

    using namespace std;

    int main ()

    {

    vectorstroptions (4);

    stroptions[0] = "Oil Change";

    stroptions[1] = "Tire Rotation";

    stroptions[2] = "Battery Check";

    stroptions[3] = "Brake Inspection";

    vector intprices (4);

    intprices[0] = 45;

    intprices[1] = 22;

    intprices[2] = 15;

    intprices[3] = 10;

    int option;

    cout<< "Welcome to Joe's Car Care Shop!" <
    cout<< "Choose a service from our menu:" <
    for (int i = 1; i< = 4; i++)

    {

    cout<< "#" <
    }

    cout<< "Choice: ";

    bool loop = true;

    while (loop)

    {

    loop = false;

    cin>> option;

    switch (option)

    {

    case 1:

    cout<< "/nA " <
    break;

    case 2:

    cout<< "/nA " <
    break;

    case 3:

    cout<< "/nA " <
    break;

    case 4:

    cout<< "/nA " <
    break;

    default:

    cout<< "/nYou entered an invalid item! Try again!" <
    loop = true;

    break;

    }

    }

    }
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “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 ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers