Create a standard C++ program wherein it satisfies the following objectives 1.Create a menu. (Under the menu, it should display the following) *Testing *Information *Exit note: create a loop link...


Create a standard C++ program wherein it satisfies the following objectives


1.Create a menu. (Under the menu, it should display the following)


*Testing


*Information


*Exit


note: create a loop link between the menu and the program will only stop if the user chooses "exit".



2.I will provide the codes under the testing menu and it's up to you if you want to improve it a little further.



3. Under the information menu, the program will then ask the user for its name, address, age, and current relationship status,



be creative and you can add small simple features to the program itself. Thanks a lot!



Here's our first version program under the testing menu


#include
using namespace std;




int main() {
    bool hasFever;
    bool hasCough;
    bool breathingProblem;
    char input;
    cout < "welcome="" to="" covid-19="" tracker="" \n="" \n"="">
    cout < "does="" the="" patient="" have="" fever?="" (y/n)="">
    cin >> input;
    if (input == 'y' || input == 'Y') {
        hasFever = true;
    } else {
        hasFever = false;
    }
    cout < "does="" the="" patient="" have="" cough?="" (y/n)="">
    cin >> input;
    if (input == 'y' || input == 'Y') {
        hasCough = true;
    } else {
        hasCough = false;
    }
    cout < "does="" the="" patient="" have="" breathing="" problem?="" (y/n)="">
    cin >> input;
    if (input == 'y' || input == 'Y') {
        breathingProblem = true;
    } else {
        breathingProblem = false;
    }

    if (hasFever && hasCough && breathingProblem) {
        cout < "alert="" required="" to="" be="" quarantine="" and="" hospitalize"=""><>
    }
    else if ((hasFever && hasCough) || (hasFever && breathingProblem) || (hasCough && breathingProblem)) {
        cout < "inform="" the="" officials="" and="" quarantine="" for="" 14="" days"=""><>
    }
    else if (hasFever || hasCough || breathingProblem) {
        cout < "home="" quarantine="" and="" observation="" for="" 7="" days"=""><>
    }
    else {
        cout < "you="" are="" safe"=""><>
    }
    return 0;
}





Jun 06, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here