d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > C++ Assignment > Into To C++
Add Reply New Topic New Poll
Member
Posts: 9,412
Joined: May 6 2008
Gold: 1,971.00
Oct 20 2017 08:30pm
Hello! I'm taking Intro to C++ and fuck the book were using absolutely sucks but my teacher was one of the reviewers so hes all about it. anyway I'm not learning shit ( granted i could be spending more time practicing )

I have a project due monday:

I would rather have help , not really asking for someone to do this for me. thanks!

Create a program that calculates and displays (to 2 places of decimal) the weekly
gross pay of hourly employees and salaried employees.
The weekly gross pay of a salaried employee is calculated by dividing the
employee’s annual salary by 52.
The weekly gross pay of an Hourly employee is calculated by multiplying the
number of hours worked by the pay rate.
Create two separate functions (one each for the Hourly employees and the Salaried
employees) as follows:
 For the Hourly employee function, prompt for two values (hours worked and
pay rate), and pass them to the function
 For the Salaried employee function, prompt for one value (yearly salary), and
pass it to the function.
Continue to request, calculate and display employee information until there is no
more employee data to process. Your program must be able to process zero
employees, to an infinite number of employees.
Demonstrate the use of the following in your solution:
 Looping
 Modularity (using functions)
Call the Hourly Employee function or the Salaried employee function, depending on
the type of employee pay the program’s user wants to process.
Except for the number of weeks in a year (52), there must be no hard–coded input
in your program.
Submit your source file(s) to the Project 4 Assignment drop box no later than 11:59
pm on Monday, October 23rd, 2017). Only .cpp and .h files will be accepted. If you
submit other types of files, they will be rejected, and you’ll receive no points. Late
submission will be rejected.

This post was edited by flowrevolution on Oct 20 2017 08:30pm
Member
Posts: 1,039
Joined: Jul 8 2008
Gold: 1,939.50
Oct 21 2017 11:21am
Do you not understand what you're supposed to be doing? You kind of just do something like this in c++:

Display a prompt where you enter 1 or 2 for hourly/salaried. 3 to exit.
Prompt for hours/rate or salary if u hit 1 or 2.
Call function and display a formatted result.
while loop around the above which you can break out of by selecting 3.
Member
Posts: 884
Joined: Aug 19 2017
Gold: 0.00
Oct 26 2017 10:33pm
Wait what part are you exactly stuck on?
Go Back To Programming & Development Topic List
Add Reply New Topic New Poll