Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

EGR 118 Lab #4 Intro The purpose of this tab is to encourage the student to think in terms of to basic programming techniques, such

image text in transcribed
EGR 118 Lab #4 Intro The purpose of this tab is to encourage the student to think in terms of to basic programming techniques, such as input, o ut and controls, the code for this project is more challenging relies on the student to time before programming to think of an orch that will work the Previous labsintroduced the student wel somebak OOP. How to write think through the logs, and to take some Calculating Change There are lots of ways to make change. For example your change to you as 3 dollar bills, quarters, 1 dime and p u t it could dimes and 3 pennies, as well as many other way s that change could be given be gets 155 dollari 3 dollar bills, 6 For calculating change in this assignment, the largest bill will be a $100 For $100 bil, use $100 for $20 bills, use $20 for $10 bills, $10 for SS use for dimes, we fornis se, and for pennies, use P. U shorthand to represent change SS, for $1 bills, 51, for quarters The Assignment Prompt the user for a dollar and change amount, say $423.30. Then calculate the change that velds the least number of bills and coins. For example, the change for $23.90 would be: 1520, 351,301, and 1 N. This is how the result would be printed. If no coins or bills are used, do not print them out for emple do not print OP, if no pennies are being used w dollar amount. The code will terminate when the user The code will continue to loop and allow the user to enter enters are Use Methods in your code, you will have a main() method within this method define in methods ames as follows int getHundred double amount) int getTwentes double amount) intetives double amount) int getOne double amount) int getQuarter double amount) int getDimes double amount) int this double amount) int gets double amount) ater and returns an , which is As indicated above each method will take a double which is the value that the w the number of the coins, orbis that we needed in the change The main() method will consist of a loop that terminates when the rates loopt will prompt the user for a dollar amount, then the mine methods for the dar amount within the the method w i t out the Conclusion Try to work slowly. Do not try to do everything at once. Try to the promotoreng first and the sentinel controlled loop. Then try to get each method working one at a time. Forget grundred working correctly, then potwenties and so forth methods are working Perform the working code for the instructor and hand in a hard copy of your code

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 23rd International Conference Dexa 2012 Vienna Austria September 2012 Proceedings Part 1 Lncs 7446

Authors: Stephen W. Liddle ,Klaus-Dieter Schewe ,A Min Tjoa ,Xiaofang Zhou

2012th Edition

3642325998, 978-3642325991

More Books

Students also viewed these Databases questions