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
What is a digital pen called<br><br>A digital pen is called a ____
steposvetlana [31]
A digital pen is a battery-operated writing instrument that allows the user to digitally capture a handwritten note or drawing. Typically, a digital pen comes with a Universal Serial Bus (USB) cradle to let the user upload the handwritten notes to a personal computer (PC).

Sometimes called a smart pen or stylus.
4 0
3 years ago
Read 2 more answers
_______and ________ enables computers to communicate and it can pass information between two networks.
lozanna [386]

Answer:

Internet Protocol and Transmission Control Protocol        

Explanation:

Internet protocol, which is also known as IP and Transmission Control Protocol, which is also known as TCP are the two important protocols that enables the computers to communicate various information and data and allow it to pass between two networks. It allows computers to connect to each other.  They are developed by Bob Kahn and Vint Cerf.

4 0
3 years ago
The type of materials used in insulators is classified as what
olganol [36]

the answer is Class H

5 0
3 years ago
Which of the following is not a component of the programming phase of facility construction? deciding what to build examining sp
Anika [276]

Answer: designing the facility with architects.

Explanation: The programming phase of a facility construction has nothing to do with the architectural design of the facility. The programming phase usually involves ; Determining the needs of intended or impending users, estimated construction cost, required area for the project. The programming phase may involve individual or joint questioning or fact finding from the intended occupants or user group to determine their needs in terms of systems and infrastructure, security and so on. It also gets intended occupants informed on the features, use and design of the intended project. It also examines the effect of the project on structures previously existing in the environment.

4 0
3 years ago
You have a unique id number, which is represented by the variable id, containing a string of numbers. write a program that conti
koban [17]

idNumber = "123456"
idNo = input("Enter the unique ID number: ")
while idNumber != idNo:
print("This is not your ID number.")
idNo = input("Enter the unique ID number: ")
print("This is your ID number: ", idNo)

Output:

sh-4.3$ python3 main.py                                                                                                                                                                                                                                                

Enter the unique ID number: 2345                                                                                                                                                                                                                                       

This is not your ID number.                                                                                                                                                                                                                                            

Enter the unique ID number: 4563                                                                                                                                                                                                                                       

This is not your ID number.                                                                                                                                                                                                                                            

Enter the unique ID number: 12345                                                                                                                                                                                                                                      

This is not your ID number.                                                                                                                                                                                                                                            

Enter the unique ID number: 123456                                                                                                                                                                                                                                     

This is your ID number:  123456

8 0
3 years ago
Read 2 more answers
Other questions:
  • Why Is Jarvis Banned For Life? Literally Don't need to be forever!
    9·1 answer
  • When activated, an Excel object has all the features of an Excel
    8·2 answers
  • ​______________________ is a general security term that includes computer​ viruses, worms, and trojan horses.
    13·1 answer
  • What is the full form of com​
    9·1 answer
  • What does this image represent?
    9·2 answers
  • Which of these is NOT a sign that someone might be drunk
    11·2 answers
  • The decimal number 3 is ___ in binary the 2s column plus the 1s column.
    11·1 answer
  • Which of the following is the best example of an installation issue?
    6·2 answers
  • Memememememmemememememememmmeememememe
    15·1 answer
  • Los organos de los sentidos perciben de la misma manera un estimulo?porque?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!