8000 GitHub - taylorericson/lab07-monetary-value: Lab 7 - Monetary Value
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

taylorericson/lab07-monetary-value

Folders an A48A d files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lab07-monetary-value

CSC 240 - Lab 7 Monetary Value

A project completed as part of the class CSC 240 at Parkland College.

Directions:

Write an application that prompts for and reads a double value representing a monetary amount. Then determine the fewest number of each bill and coin needed to represent that amount, starting with the highest (assume that a ten-dollar bill is the maximum size needed). For example, if the value entered is 47.63 (forty-seven dollars and sixty-three cents), then the program should print the equivalent amount as shown below. Continue prompting until the user enters “quit”. 

4 ten dollar bills

1 five dollar bills

2 one dollar bills

2 quarters

1 dimes

0 nickels

3 pennies

You must develop at least one class (excluding the driver class) for this assignment. You must also use a try-catch statement in your driver class to handle invalid input entered by the user (e.g. an invalid string is entered instead of a double). In the event of such an exception, print a statement indicating the exception occurred as follows and continue looping until the user enters “quit”.

About

Lab 7 - Monetary Value

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0