Homework Help Question & Answers

MindTap- Cengage Learning -Mozilla Firefox ⓘ https://ng cengage.com stat /nbu evo/index.html?depl...

MindTap- Cengage Learning -Mozilla Firefox ⓘ https://ng cengage.com stat /nbu evo/index.html?deploymentid-574532 19 1 2501212MindTap- Cengage Learning -Mozilla Firefox ⓘ https://ng cengage.com stat /nbu evo/index.html?deploymentid-574532 19 1 2501212MindTap - Cengage Learning - Mozilla Firefox ⓘ https://ngcengage.com/stati dex.html?deploymentid-574532 191250121250466990554MindTap- Cengage Learning -Mozilla Firefox ⓘ https://ng cengage.com/statinbuevo/index.html?deploymentid-574532 19125012125046

Comments
    0 0
    Next > < Previous
    ReportAnswer #1

    #include <iostream>
    #include <string>

    using namespace std;
    void houseKeeping();
    void detailLoop();
    void endOfJob();

    string employeeFirstName;
    string empoyeeLastName;
    double numTransactions;
    double shifts;
    double dollarValue;
    double score;
    double bonus;
      
    const double Bonus_1 = 50.0;
    const double Bonus_2 = 75.0;
    const double Bonus_3 = 100.0;
    const double Bonus_4 = 200.0;

    int main()
    {
    houseKeeping();
    detailLoop();
    endOfJob();

    return 0;
    }

    void houseKeeping() {

    cout << "Enter employee's first name:";
    cin >> employeeFirstName;
      
    cout << "Enter employee's last name:";
    cin >> empoyeeLastName;
      
    cout << "Enter number of shiftes:";
    cin >> shifts;
      
    cout << "Enter number of transactions:";
    cin >> numTransactions;
      
    cout << "Enter dollar value of transaction:";
    cin >> dollarValue;
    }

    void detailLoop() {
    score = (dollarValue/numTransactions)/shifts;
    if (score <= 30.0) {
    bonus = Bonus_1;
    }
    else if (score > 30.0 && score < 70.0) {
    bonus = Bonus_2;
    }
    else if (score > 69.0 && score < 200.0) {
    bonus = Bonus_3;
    }
    else {
    bonus = Bonus_4;
    }
      
    }

    void endOfJob() {
    cout << "Employee's name: " << employeeFirstName << " " << empoyeeLastName << endl;
    cout << "Employee's Bonus: " << bonus << endl;
    }

    The output of the program is in the image belowEnter employees first name:Alen Enter employees last name: Joe Enter number of shiftes:5 Enter number of transactions:10 En

    if you have any doubt then you can ask in the comment section and please like the answer

    Know the answer?
    Add Answer of:
    MindTap- Cengage Learning -Mozilla Firefox ⓘ https://ng cengage.com stat /nbu evo/index.html?depl...
    Your Answer: Your Name: What's your source?
    Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
    Similar Homework Help Questions
    Need Online Homework Help?
    Ask a Question
    Get Answers For Free
    Most questions answered within 3 hours.
    Share Your Knowledge

    Post an Article
    Post an Answer
    Post a Question with Answer

    Self-promotion: Authors have the chance of a link back to their own personal blogs or social media profile pages.