Database System Concepts
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
Bartleby Related Questions Icon

Related questions

Question
// EmployeeBonus.cpp - This program calculates an employee's yearly bonus.

#include <iostream>
#include <string>
using namespace std;
int main()
{
// Declare and initialize variables here
string employeeFirstName;
string employeeLastName;
double numTransactions;
double numShifts;
double dollarValue;
double score;
double bonus;
const double BONUS_1 = 50.00;
const double BONUS_2 = 75.00;
const double BONUS_3 = 100.00;
const double BONUS_4 = 200.00;
// This is the work done in the housekeeping() function
cout << "Enter employee's first name: ";
cin >> employeeFirstName;
cout << "Enter employee's last name: ";
cin >> employeeLastName;
cout << "Enter number of shifts: ";
cin >> numShifts;
cout << "Enter number of transactions: ";
cin >> numTransactions;
cout << "Enter dollar value of transactions: ";
cin >> dollarValue;

// This is the work done in the detailLoop()function
// Write your code here
// This is the work done in the endOfJob() function
// Output.
cout << "Employee Name: " << employeeFirstName << " " << employeeLastName << endl;
cout << "Employee Bonus: $" << bonus << endl;
return 0;
}
[画像:>> CENGAGE MINDTAP Understanding Nested if Statements in C+ Understanding Nested if EmployeeBonus.c 而 Statements 1// EmployeeBa sols 21 Summary 3 #include <ios 4 #include <str In this lab, you complete a prewritten C++ program 5 using namespar that calculates an employee's productivity bonus and 6 int main() prints the emnployee's name and bonus. Bonuses are calculated based on an employee's productivity score 7{ 8 // Declare 9 string empl string empl double numT as shown below. A productivity score is calculated by 10 first dividing an employee's transactions dollar value by the number of transactions and then dividing the 11 12 double numS result by the number of shifts worked. 13 double doll 14. double score 15 double bonus Productivity Score Bonus 16 const double 17 const double <=30 50ドル 18 const double 19 const double 31-69 75ドル 20 21 / This is t 70-199 100ドル 22 cout << Ente 23 cin >> employ >=200 200ドル 24 cout << "Ente 25 cin >> employ 26 cout << "Ente Instructions 27 cin >> numShi 28 cout <<"Ente 1. Ensure the file named EmployeeBonus.cpp is 29 cin >> numTrai 30 cout << Enter open in the code editor. 31 cin >> dollarL 32 2. Variables have been declared for you, and the 33 / This is the 34 input statements and output statements have WWrite your (35 been written. Read them over carefully before 36 W This is the you proceed to the next step. // Output. cout <<"Employ 37 38 3. Design the logic, and write the rest of the cout << "Empley 139. program using a nested if statement. 40 return 0; 41 ) 4. Execute the program by clicking the Run button 0 耳 ]
expand button
Transcribed Image Text:>> CENGAGE MINDTAP Understanding Nested if Statements in C+ Understanding Nested if EmployeeBonus.c 而 Statements 1// EmployeeBa sols 21 Summary 3 #include <ios 4 #include <str In this lab, you complete a prewritten C++ program 5 using namespar that calculates an employee's productivity bonus and 6 int main() prints the emnployee's name and bonus. Bonuses are calculated based on an employee's productivity score 7{ 8 // Declare 9 string empl string empl double numT as shown below. A productivity score is calculated by 10 first dividing an employee's transactions dollar value by the number of transactions and then dividing the 11 12 double numS result by the number of shifts worked. 13 double doll 14. double score 15 double bonus Productivity Score Bonus 16 const double 17 const double <=30 50ドル 18 const double 19 const double 31-69 75ドル 20 21 / This is t 70-199 100ドル 22 cout << Ente 23 cin >> employ >=200 200ドル 24 cout << "Ente 25 cin >> employ 26 cout << "Ente Instructions 27 cin >> numShi 28 cout <<"Ente 1. Ensure the file named EmployeeBonus.cpp is 29 cin >> numTrai 30 cout << Enter open in the code editor. 31 cin >> dollarL 32 2. Variables have been declared for you, and the 33 / This is the 34 input statements and output statements have WWrite your (35 been written. Read them over carefully before 36 W This is the you proceed to the next step. // Output. cout <<"Employ 37 38 3. Design the logic, and write the rest of the cout << "Empley 139. program using a nested if statement. 40 return 0; 41 ) 4. Execute the program by clicking the Run button 0 耳
[画像:4 #incl 70-199 100ドル 5 using 6 int m >= 200 200ドル 8. sti Instructions 10 sti 11 dou 1. Ensure the file named EmployeeBonus.cpp is 12 dou 13 dou open in the code editor. 14 dou 2. Variables have been declared for you, and the 15 dou 16 con: input statements and output statements have 17 cons been written. Read them over carefully before 18 cons 19 cons you proceed to the next step. 20 21 // 3. Design the logic, and write the rest of the 22 Couti program using a nested f statement. 23 cin 24 cout 4. Execute the program by clicking the Run button 25 cin > and enter the following as input: 26 cout 27 cin > 28 cout Employee's first name: Kin 29 cin > Employee's last name: Smith 30 cout Number of shifts: 25 31 cin >> 32 Number of transactions: 75 33 W Thi 34 7/Wri Transaction dollar value: 40000 00 35, 36 WThis 5. Your output should be: 37 //Outp 38 cout K< Employee Nane: Kin Smith 39 cout << Employee Bonus: 50ドル.0 40 return 41), ]
expand button
Transcribed Image Text:4 #incl 70-199 100ドル 5 using 6 int m >= 200 200ドル 8. sti Instructions 10 sti 11 dou 1. Ensure the file named EmployeeBonus.cpp is 12 dou 13 dou open in the code editor. 14 dou 2. Variables have been declared for you, and the 15 dou 16 con: input statements and output statements have 17 cons been written. Read them over carefully before 18 cons 19 cons you proceed to the next step. 20 21 // 3. Design the logic, and write the rest of the 22 Couti program using a nested f statement. 23 cin 24 cout 4. Execute the program by clicking the Run button 25 cin > and enter the following as input: 26 cout 27 cin > 28 cout Employee's first name: Kin 29 cin > Employee's last name: Smith 30 cout Number of shifts: 25 31 cin >> 32 Number of transactions: 75 33 W Thi 34 7/Wri Transaction dollar value: 40000 00 35, 36 WThis 5. Your output should be: 37 //Outp 38 cout K< Employee Nane: Kin Smith 39 cout << Employee Bonus: 50ドル.0 40 return 41),
Expert Solution
Check Mark
Knowledge Booster
Background pattern image
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
    SEE MORE QUESTIONS
    Recommended textbooks for you
    Text book image
    Database System Concepts
    Computer Science
    ISBN:9780078022159
    Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
    Publisher:McGraw-Hill Education
    Text book image
    Starting Out with Python (4th Edition)
    Computer Science
    ISBN:9780134444321
    Author:Tony Gaddis
    Publisher:PEARSON
    Text book image
    Digital Fundamentals (11th Edition)
    Computer Science
    ISBN:9780132737968
    Author:Thomas L. Floyd
    Publisher:PEARSON
    Text book image
    C How to Program (8th Edition)
    Computer Science
    ISBN:9780133976892
    Author:Paul J. Deitel, Harvey Deitel
    Publisher:PEARSON
    Text book image
    Database Systems: Design, Implementation, & Manag...
    Computer Science
    ISBN:9781337627900
    Author:Carlos Coronel, Steven Morris
    Publisher:Cengage Learning
    Text book image
    Programmable Logic Controllers
    Computer Science
    ISBN:9780073373843
    Author:Frank D. Petruzella
    Publisher:McGraw-Hill Education