1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
algol [13]
3 years ago
6

In this lab, you complete a prewritten C++ program that calculates an employee’s productivity bonus and prints the employee’s na

me 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
= 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
Your output should be:
Employee Name: Kim Smith
Employee Bonus: $50.0
Grading
When you have completed your program, click the Submit button to record your score.
Computers and Technology
1 answer:
Bas_tet [7]3 years ago
6 0

Answer:

The answer to this question is given below in the explanation section

Explanation:

    The formula for productivity socre is      

 productivity score = ((transaction dollar value/no of transaction)/no of shift)

Productivity Score Bonus  is:  

<=30 $50

31–69 $75

70–199 $100

>= 200 $200

........................................................................................................................................

the code is given below

........................................................................................................................................

#include <iostream>

using namespace std;

int main()

{

   string firstName;

   string lastName;

   int noOfShift;

   int noOfTransaction;

   int transactionDollarValue;

   int productivityScore;

   int bonus;

   

   cout<<"Employee’s first name: ";

   cin>>firstName;

   cout<<"Employee's last name: ";

   cin>>lastName;

   cout<<"Number of shifts:";

   cin>>noOfShift;

   cout<<" Number of transactions: ";

   cin>>noOfTransaction;

   cout<<"Transaction dollar value:";

   cin>>transactionDollarValue;

   productivityScore = (transactionDollarValue/noOfTransaction)/noOfShift;

   

   if (productivityScore <= 30)

   {

       bonus =50;

       cout<<"Employee’s first name: "<<firstName<<" "<<lastName;

       cout<<endl;

       cout<<"Employee Bonuse: $"<<bonus;

       cout<<endl;

   }

   

   else if (productivityScore >= 79 && productivityScore <=199)

   

   {

       bonus =100;

       cout<<"Employee’s first name: "<<firstName<<" "<<lastName;

       cout<<"Employee Bonuse: $"<<bonus;

   }

   

   else if (productivityScore >= 200)

   

   {

       bonus =200;

       cout<<"Employee’s first name: "<<firstName<<" "<<lastName;

       cout<<"Employee Bonuse: $"<<bonus;

   }

   

   return 0;

}

               

       

You might be interested in
Unscramble thr words <br>1.Nsieg Wiev<br>2.Seeathdat ievw​
valentinak56 [21]

Answer: genis view       headset view

Explanation:

6 0
2 years ago
Read 2 more answers
PLEASE HELP ASAP i will mark brilliant
Ray Of Light [21]
1. Cyberbullying
2.Confide in an adult you trust, such as a teacher or a parent
3.It is easy to miscommunicate  and escalate the situation in an online environment

Cyberbully hurts people, so NEVER post something that could hurt someone's feelings

Hope this helps!
3 0
3 years ago
Read 2 more answers
Which of the following activities can cause data to be damaged or lost?
jekas [21]
Illegal access to a system
3 0
3 years ago
Write a program that will ask the user to enter the amount of a purchase. The program should then compute the state and county s
iVinArrow [24]

Answer:

purchase_amount = float(input("Enter the amount of a purchase: "))

state_sales_tax = purchase_amount * 0.05

country_sales_tax = purchase_amount * 0.025

print("The amount of the purchase is " + str(purchase_amount))

print("The state sales tax is " + str(state_sales_tax))

print("The county sales tax is " + str(country_sales_tax))

print("The total sales tax is " + str(state_sales_tax + country_sales_tax))

print("The total of the sale is " + str(purchase_amount + state_sales_tax + country_sales_tax))

Explanation:

*The code is in Python.

Ask the user to enter purchase amount

Calculate the state sales tax, multiply purchase amount by 0.05

Calculate the county sales tax, multiply purchase amount by 0.025

Calculate the total sales tax, sum the state sales tax and county sales tax

Print the amount of the purchase, state sales tax, county sales tax, total sales tax and  total of the sale

7 0
3 years ago
These operating systems were referred to as command-based.
Doss [256]

{\underline{\boxed{\bf{MS - DOS \:  and \:  UNIX}}}}

3 0
2 years ago
Read 2 more answers
Other questions:
  • What is a constructor? Why would you include a constructor in a class?
    6·1 answer
  • If r is an instance of the above Person class and oddNum has been declared as a variable of type boolean, which of the following
    8·1 answer
  • Using the _____ model brings sellers and buyers together on the web and collects commissions on transactions between these parti
    5·1 answer
  • Which Internet Explorer security zone includes all Internet Web sites that are not specifically assigned to another zone?
    7·1 answer
  • Chapter 8 discusses five principles for making a graphic clear and understandable. One principle is that the graphic should have
    11·1 answer
  • . In testing, what is the role of an oracle?
    15·1 answer
  • The following shared data structures must be declared as global variables such that they are shared by all threads
    7·1 answer
  • Research and recommend the most appropriate VPN technology. The most likely solution is either an Internet Protocol Security (IP
    5·1 answer
  • Ways to be your best digital self?
    7·1 answer
  • Use the drop-down menus to complete each statement. Two main versions of Outlook are the desktop app and the app. The has limite
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!