Ask 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 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.

+5
Answers (1)
  1. 13 July, 23:24
    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 & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers