Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

COMP 1 5 0 - Spring 2 0 2 4 W 2 Lab Instructions Your task is to write a program that will prompt the

COMP 150- Spring 2024
W2 Lab Instructions
Your task is to write a program that will prompt the user to enter values, as I described in the calorie calculator program that was shared during lecture last week, while using the language C++The calorie calculator application that we went over in class will be available on Canvas for your reference, located under the weekly WebEx video.
You will need to have the program accept the values into appropriate variables, calculate the total price of "something", and then display it to the user.
The paycheck calculator program calculates a user's gross weekly and take home pay. As with the calorie calculator, the formulae are provided for you below.
Console
Paycheck Calculator
Hours Worked: 35
Hourly Pay Rate: 14.50
Gross Pay: ,507.5
Tax Rate: ,188
Tax Amount: ,91.35
Take Home Pay: ,416.15
Specifications
The formula for calculating gross pay is:
gross pay = hours worked * hourly rate
The formula for calculating tax amount is:
tax amount = gross pay *(tax rate ?100
The formula for calculating take home pay is:
take home pay = gross pay - tax amount
The tax rate should be 18%, but the code should store the tax rate in a variable. That way, you can easily change the tax rate later, just by changing the value that's stored in the variable.
The program should accept decimal entries like 35.5 and 14.25.
The program should round the results to a maximum of two decimal places.
The source code must have a block comment at the beginning that documents the student's name, course number, lab number, and a brief description of what the program does. Be sure to use meaningful variable names and place comments within the code to explain what the code is doing. Compress the entire solution folder structure into a single zipped file named Lastname,Firstname_LabX.zip, where last name and first name are your last name and first name respectively and the x is the lab number and the version that you were assigned.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle 12c SQL

Authors: Joan Casteel

3rd edition

1305251032, 978-1305251038

More Books

Students also viewed these Databases questions

Question

e. What happens to our real exchange rate?

Answered: 1 week ago