In this lab, you complete a prewritten C++ program that calculates an employee’s productivity bonus and prints the employee’s name and bonus. Bonuses are calculated based on an employee’s productivity score as shown below. A productivity score is calculated by first dividing an employee’s transactions dollar value by the number of transactions and then dividing the result by the number of shifts worked.
| Productivity Score | Bonus |
|---|---|
| <=30 | $50 |
| 31–69 | $75 |
| 70–199 | $100 |
| >= 200 | $200 |
Instructions
Ensure the file named EmployeeBonus.cpp is open in the code editor.
Variables have been declared for you, and the input statements and output statements have been written. Read them over carefully before you proceed to the next step.
Design the logic, and write the rest of the program using a nested if statement.
Execute the program by clicking the Run button and enter the following as input:
Employee’s first name: Kim Employee's last name: Smith Number of shifts: 25 Number of transactions: 75 Transaction dollar value: 40000.00
Employee Name: Kim Smith Employee Bonus: $50.0
I keep getting multiple errors, can somebody help?
#include <iostream>
using namespace std;
int main()
{
string first, last;
int shifts, transactions;
float dollorvalue, score;
cout<<"Employee’s first name: ";
cin>>first;
cout<<"Employee's last name: ";
cin>>last;
cout<<"Number of shifts: ";
cin>>shifts;
cout<<"Number of transactions: ";
cin>>transactions;
cout<<"Transaction dollar value: ";
cin>>dollorvalue;
cout<<endl;
score = (dollorvalue / transactions) / shifts;
if (score >= 200)
{
cout<<"Employee Name:
"<<first<<" "<<last<<endl;
cout<<"Employee Bonus:
$200"<<endl;
}
else if (score >= 70)
{
cout<<"Employee Name:
"<<first<<" "<<last<<endl;
cout<<"Employee Bonus:
$100"<<endl;
}
else if (score >= 31)
{
cout<<"Employee Name:
"<<first<<" "<<last<<endl;
cout<<"Employee Bonus:
$75"<<endl;
}
else
{
cout<<"Employee Name:
"<<first<<" "<<last<<endl;
cout<<"Employee Bonus:
$50"<<endl;
}
return 0;
}


In this lab, you complete a prewritten C++ program that calculates an employee’s productivity bonus and...
SummaryIn this lab, you complete a prewritten C++ program that calculates an employee's productivity bonus and prints the employee's name and bonus. Bonuses are calculated based on an employee's productivity score as shown below. A productivity score is calculated by first dividing an employee's transactions dollar value by the number of transactions and then dividing the result by the number of shifts worked.
Multiple Conditional Statements Summary In this lab, you complete a Python program that calculates an employee's annual bonus. Input is an employee's first name, last name, salary, and numeric performance rating. If the rating is 1, 2, or 3, the bonus rate used is .25, .15, or .1 respectively. If the rating is 4 or higher, the rate is 0. The employee bonus is calculated by multiplying the bonus rate by the annual salary. Variables have been declared for you,...
unctions with No Parameters Summary In this lab, you complete a partially prewritten Python program that includes a function with no parameters. The program asks the user if they have preregistered for art show tickets. If the user has preregistered, the program should call a function named discount() that displays the message "You are preregistered and qualify for a 5% discount." If the user has not preregistered, the program should call a function named noDiscount() that displays the message "Sorry,...
Please help, In this lab, you complete a prewritten C++ program for a carpenter who creates personalized house signs. The program is supposed to compute the price of any sign a customer orders, based on the following facts: The charge for all signs is a minimum of $35.00. The first five letters or numbers are included in the minimum charge; there is a $4 charge for each additional character. If the sign is made of oak, add $20.00. No charge...
please help, In this lab, you complete a C++ program with the provided data files. The program calculates the amount of tax withheld from an employee’s weekly salary, the tax deduction to which the employee is entitled for each dependent, and the employee’s take- home pay. The program output includes state tax withheld, federal tax withheld, dependent tax deductions, salary, and take-home pay. Instructions Ensure the source code file named Payroll.cpp is open in the code editor. Variables have been...
C++ Program The Ward Bus Manufacturing Company has recently hired you to help them convert their manual payroll system to a computer-based system. Write a program to produce a 1-week payroll report for only one employee to serve as a prototype (model) for the administration to review. Input for the system will be the employee’s 4-digit ID number, the employee’s name, hours worked that week, and the employee’s hourly pay rate. Output should consist of the employee’s ID number, the...
Write a complete C++ program that reads students names and their test scores from an input text file. The program should output each student’s name followed by the test scores and the relevant grade in an output text file. It should also find and display on screen the highest/lowest test score and the name of the students having the highest/lowest test score, average and variance of all test scores. Student data obtained from the input text file should be stored...
Directions: You are to write a C++ program that meets the instruction requirements below. Deliverables: · Your C++ source code file. (The file with the .CPP extension). No other files will be accepted. A screenshot of your program running. Program Instructions: Consider the following incomplete C++ program: #include int main() { … } 1. Write a statement that includes the header files fstream, string, and iomanip in this program. 2. Write statements that declare inFile to be an ifstream variable...
Please write the following program in Java That last idea at PicoSoft didn't work out too well … management has a massive public relations disaster on their hands, and thus they decide to revise the bonus structure, as well as give eveyone some additional vacation time. Write a program that reads in (from the keyboard) the following information about an employee: Last name First name Years worked (a whole number) Annual salary An employee's vacation time is based upon the...
Swapping Values in python Summary In this lab, you complete a Python program that swaps values stored in three variables and determines maximum and minimum values. The Python file provided for this lab contains the necessary input and output statements. You want to end up with the smallest value stored in the variable named first and the largest value stored in the variable named third. You need to write the statements that compare the values and swap them if appropriate....