Ask Question
27 March, 10:07

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.

+4
Answers (1)
  1. 27 March, 12:46
    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?
Get 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 there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers