Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This program will compute an invoice based on values entered by the user. The invoice computes a total ( Gross ) bill amount based on

This program will compute an invoice based on values entered by the user. The invoice computes a
total (Gross) bill amount based on the number of hours invoiced and the hourly rate (the gross amount
is the product of those two values).
The user provides a discount code of 1,2, or 3.1 is 10% discount, 2 is 12% discount, 3 is 15% discount.
Any other value results in a discount of 0.0.
An invoice must be printed to the screen. For example. Notice how the invoice amounts line up:
INVOICE
Hours Invoiced: 100.0, Hourly Rate: $21.40
Gross Invoice: $2140.00
Discount: $ 214.00(Discount Code 1)
Net Invoice: $1926.00(Pay This Amount)
END INVOICE
After printing an invoice, ask the user if they want to continue and enter another set of data (Y or N).
Your program should loop as long as the response is a Y or a y.
Sample Execution
Below is shown a screen capture of what the program would look like if I ran it with two sets of input
data. The values in YELLOW are what were entered by the user in this example execution.Welcome to the invoice calculator.
Please enter the hours invoiced: 100
Please enter the hourly invoice rate: 21.40
Please enter the discount code (1=108,2=128,3=15%):1
Hours Involced: 100.0 Hourly Rate: $ 21.40
Gross Involce: $2140.00
Discount: $214.00(Discount Code 1)
Net Invoice: $1926.00(Pay This Amount)
Would you like to compute another Invoice YN?Y
Please enter the hours invoiced: 235.5
Please enter the hourly invoice rate: 15.25
Please enter the discount code (1=10%,2=12%,3=15%):0
Hours Involced: 235.5, Hourly Rate: $ 15.25
Gross Involce: $3591.38
Discount: $0.00(Discount Code 0)
Net Invoice: $3591.38(Pay This Amount)
Would you like to compute another Invoice YN?n
Bnd Program 2. Goodbye.
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

Database And Expert Systems Applications Dexa 2021 Workshops Biokdd Iwcfs Mlkgraphs Al Cares Protime Alsys 2021 Virtual Event September 27 30 2021 Proceedings

Authors: Gabriele Kotsis ,A Min Tjoa ,Ismail Khalil ,Bernhard Moser ,Atif Mashkoor ,Johannes Sametinger ,Anna Fensel ,Jorge Martinez-Gil ,Lukas Fischer

1st Edition

3030871002, 978-3030871000

More Books

Students also viewed these Databases questions