ELET 2300 Assignment 1 Problem Description A company pays its employees as managers (who receive a fixed weekly salary), hourly workers (who receive a fixed hourly wage for up to the first 40 hours...

1 answer below »
attached below


ELET 2300 Assignment 1 Problem Description A company pays its employees as managers (who receive a fixed weekly salary), hourly workers (who receive a fixed hourly wage for up to the first 40 hours they work and “time-and-a-half,” i.e. 1.5 times their hourly wage, for overtime hours worked), commission workers (who receive $250 plus 5.7% of their gross weekly sales), or pieceworkers (who receive a fixed amount of money per item for each of the items they produce-each pieceworker in this company works on only one type of item). Write a program to compute the weekly pay for each employee. You do not know the number of employees in advance. Each type of employee has its own pay code: Managers have pay code 1, hourly workers have code 2, commission workers have code 3 and pieceworkers have code 4. Use a switch to compute each employee’s pay based on that employee’s paycode. Within the switch, prompt the user to enter the appropriate facts your program needs to calculate each employee’s pay based on that employee’s paycode. SampleOutput Enter paycode (-1 to end): 3 Commission worker selected. Enter gross weekly sales: 4000 Commission worker’s pay is $ 478.00 Enter paycode (-1 to end): 2 Hourly worker is selected. Enter hourly salary: 4.5 Enter the total hours worked: 20 Worker’s pay is $90.00 Enter paycode (-1 to end): -1 Summary of Payouts Employee Categories Number Paid —————————— —————– Managers 0 Hourly Workers 1 Commission Workers 0 Piece Workers 0 Important Notes • Your file must be virus FREE (Zero will be given for infected file). • Your program must include appropriate code comments, • On the due date, please submit your source file only
Answered Same DayOct 05, 2021

Answer To: ELET 2300 Assignment 1 Problem Description A company pays its employees as managers (who receive a...

Neha answered on Oct 20 2021
153 Votes
/******************************************************************************
Welcome to GDB Onli
ne.
GDB online is an online compiler and debugger tool for C, C++, Python, Java, PHP, Ruby, Perl,
C#, VB, Swift, Pascal, Fortran, Haskell, Objective-C, Assembly, HTML, CSS, JS, SQLite, Prolog.
Code, Compile, Run and Debug online from anywhere in world.
*******************************************************************************/
#include
#include
using namespace std;
int main()
{
int paycode = 0;
    double weeklySalary;
    double hourlySalary;
    int hours;
    double grossSales;
    double payPerItem;
    int items;
    double totalPay;
    int manager = 0;
    int hourly = 0;
    int commission = 0;
    int pieceworker = 0;
    
    cout <<...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here