Purchase Solution

Write a Program to Calculate Weekly Pay

Not what you're looking for?

Ask Custom Question

A company pay its employees as managers (who receive a fixed weekly salary), hourly workers (who receive a fixed hourly wage for up to the 40 hours they work and "time-and-a-half"- 1.5 times their hourly wage- for overtime hours workers), commission workers (who receive $250 plus 5.7% of their gross weekly sales), or pieceworkers (who received 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 that commutes the weekly pay for each employee. Each type of employee has its own pay code: Managers have has pay code 1, hourly workers have code 2, commission workers have code 3 and pieceworkers have code 4. I also have to use a switch to compute each employee's pay according to that employee's pay code. Within the switch, prompt the user (i.e. the payroll clerk) to enter the appropriate facts the program needs to calculate each employee's pay according to that employee's pay code.

Purchase this Solution

Solution Summary

This solution provides guidelines on how to write a program that allows one to determine the pay for different types of employees (managers, hourly workers, commission workers, or pieceworkers).

Solution Preview

To write such a program that commutes the weekly pay for each employee, we need to first make the program asks the user for an employee pay code, then we use a switch statement to determine which function to use to calculate the wages for the employee. The program then need to ask the user to enter the facts needed to calculate each employee's pay.

To do this we need to first establish the constants and variables the program will need.

Following is an algorithm for such a program.

"Constant" and "Real" are data types needed ...

Purchase this Solution


Free BrainMass Quizzes
Word 2010: Tables

Have you never worked with Tables in Word 2010? Maybe it has been a while since you have used a Table in Word and you need to brush up on your skills. Several keywords and popular options are discussed as you go through this quiz.

Word 2010: Table of Contents

Ever wondered where a Table of Contents in a Word document comes from? Maybe you need a refresher on the topic? This quiz will remind you of the keywords and options used when working with a T.O.C. in Word 2010.

Excel Introductory Quiz

This quiz tests your knowledge of basics of MS-Excel.

C++ Operators

This quiz tests a student's knowledge about C++ operators.

Basic Networking Questions

This quiz consists of some basic networking questions.