Your task for this assignment is to use C++ language to implement a net pay function. 1. Implement a net pay function using the C++ programming language. The program should begin by prompting and obtaining three input real number values for hours worked, rate of pay and deductions. Net pay is determined by computing gross pay and then subtracting deductions. Gross pay is the sum of hours worked up to 40 multiplied by rate of pay and hours worked over 40 multiplied by 1.5 times rate of pay, i.e. overtime. A real numer function called “netpay” should receive as arguments the three input values and should return the computed net pay as a result. 2. The program should display the input values and the computed net pay, all clearly labeled on the console. 3. The program file should be named csc231_prog2_lastname.cpp. Your C++ program should contain comments starting on line 1 containing this information: a. The course name, ID and section b. your name c. the file name d. the program assignment number and due date e. the program purpose You are encouraged to add additional comments throughout the program that your feel might be helpful to the reader of your source code.

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter6: User-defined Functions
Section: Chapter Questions
Problem 17PE
icon
Related questions
Question

Your task for this assignment is to use C++ language to implement a net pay function.
1. Implement a net pay function using the C++ programming language. The program should
begin by prompting and obtaining three input real number values for hours worked, rate
of pay and deductions. Net pay is determined by computing gross pay and then subtracting
deductions. Gross pay is the sum of hours worked up to 40 multiplied by rate of pay and
hours worked over 40 multiplied by 1.5 times rate of pay, i.e. overtime.
A real numer function called “netpay” should receive as arguments the three input values
and should return the computed net pay as a result.
2. The program should display the input values and the computed net pay, all clearly labeled
on the console.
3. The program file should be named csc231_prog2_lastname.cpp. Your C++ program should
contain comments starting on line 1 containing this information:
a. The course name, ID and section
b. your name
c. the file name
d. the program assignment number and due date
e. the program purpose
You are encouraged to add additional comments throughout the program that your feel
might be helpful to the reader of your source code.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Concept of Parenthesis
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
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr