Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using JGrasp Java EGR 140: Computer Programming Assignment # 9 Assigned: Friday, 29 September 2017 Due: Wednesday, 4 October 2017 Points: 20 m to do

Using JGrasp Java
image text in transcribed
image text in transcribed
EGR 140: Computer Programming Assignment # 9 Assigned: Friday, 29 September 2017 Due: Wednesday, 4 October 2017 Points: 20 m to do the following things. It Write an error-free Java progra calculates the bills and coins that a cashier needs to give to a customer after they have made a purchase. Prompts the user to input two data values. The first data value is an integer that corresponds to dollars (number will be less than 200 but greater than-1). The second data value is a cents value and should be between 0 and 99 (inclusive). Make the user reenter the dollar and/or cents value if it is not in the correct range he main program, call two methods that dictate how many bills/coins a customer should get as change back from the purchase. The values entered by the user correspond to the amount that the person should get back. The first method should receive from the main program the number of dollars and determine the fewest number of bills to return to the customer out of 20's, 10's, 5's and 1's. The second method should receive from the main program the number of cents and determine the fewest number of coins (quarters, dimes, nickels, pennies) to return to the customer For this program, one (or both) methods must have void return values. Therefore, the display (print)) statements will be in the method, not in main0 The program should print a message saying something like is: . Enter a dollar value

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 Marketing The Ultimate Marketing Tool

Authors: Edward L. Nash

1st Edition

0070460639, 978-0070460638

More Books

Students also viewed these Databases questions