Implement a net pay function

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

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.
4. Submit your C++ program file as an attachment to an email message to
kbyron@bmcc.cuny.edu using a subject in this form: “csc231_prog2_lastname”. No other
files are to be submitted.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 1 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
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education