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
The spreadsheet below shows how much money each store raised for charity during the months of January, February, and March. A1:
Elenna [48]

Answer:

B2:B4

Explanation:

6 0
3 years ago
Read 2 more answers
After a security incident is verified in a SOC, an incident responder reviews the incident but cannot identify the source of the
oksian1 [2.3K]

Answer:

Option A i.e., SME for further investigation.

Explanation:

Following the reports of such a security incident into an SOC, an incident respondent examines the incident but could not determine the cause of that same incident as well as establish an appropriate response protocol. The ticket for an incident must be applied to SME for even more inquiry. So, the following answer is correct.

5 0
3 years ago
6.23 LAB: Convert to binary - functions Instructor note: This is a lab from a previous chapter that now requires the use of a fu
Kitty [74]

Answer:

The program in Python is as follows:

import math

def integer_to_reverse_binary(integer_value):

   remainder = ""

   while integer_value>=1:

       remainder+=str(integer_value % 2)

       integer_value=math.floor(integer_value/2)

   reverse_string(remainder)

def reverse_string(input_string):

   binaryOutput=""

   for i in range(len(input_string)-1,-1,-1):

       binaryOutput = binaryOutput + input_string[i]

   print(binaryOutput)

integer_value = int(input("Enter a Number : "))

integer_to_reverse_binary(integer_value)

Explanation:

This imports the math module

import math

This defines the integer_to_reverse_binary function

def integer_to_reverse_binary(integer_value):

This initializes the remainder to an empty string

   remainder = ""

This loop is repeated while the integer input is greater than or equal to 1

   while integer_value>=1:

This calculates the remainder after the integer value is divided by 2

       remainder+=str(integer_value % 2)

This gets the floor division of the integer input by 2

       integer_value=math.floor(integer_value/2)

This passes the remainder to the reverse_string function

   reverse_string(remainder)

The reverse_string function begins here

def reverse_string(input_string):

This initializes the binaryOutput to an empty string

   binaryOutput=""

This iterates through the input string i.e. the string of the remainders

   for i in range(len(input_string)-1,-1,-1):

This reverses the input string

       binaryOutput = binaryOutput + input_string[i]

This prints the binary output

   print(binaryOutput)

<u>The main begins here</u>

This gets input for integer_value

integer_value = int(input("Enter a Number : "))

This passes the integer value to the integer_to_reverse_binary function

integer_to_reverse_binary(integer_value)

3 0
2 years ago
TO COMPUTING IN BUSINE
Diano4ka-milaya [45]

Answer:

<em>the</em><em> </em><em>correct</em><em> </em><em>answer</em><em> </em><em>is</em><em> </em><em>a.</em><em> </em><em>Word</em><em> </em><em>processing</em><em>.</em>

Explanation:

<em><u>hope</u></em><em><u> </u></em><em><u>this</u></em><em><u> </u></em><em><u>works</u></em><em><u> </u></em><em><u>out</u></em><em><u>!</u></em><em><u>!</u></em><em><u>!</u></em><em><u>!</u></em><em><u>!</u></em>

5 0
3 years ago
Which of the following software is unique to a Mac?
kherson [118]
Pages is owned by apple and thats what my mac has default
6 0
3 years ago
Read 2 more answers
Other questions:
  • Ead the following scenario and then answer the question.
    10·1 answer
  • Which option helps you choose the design of a slide in a presentation?
    10·1 answer
  • What’s good and bad about having social media?
    14·2 answers
  • Imagine that the following two lines of code are placed inside a
    11·1 answer
  • When referring to hard drives, access time is measured in
    11·1 answer
  • Which technology has the potential to be misused to make atomic bombs? A. computer technology B. nuclear technology C. medical t
    14·1 answer
  • Rate my dog out of ten give explanation why
    12·1 answer
  • List 5 differences between monitors and printers​
    14·1 answer
  • I need help <br> with a question<br> what can i write for ex when he mad
    13·2 answers
  • Which tool uses images and other visual elements to provide artistic
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!