Write an application that prompts for and reads "double" value representing a monetary amount. Then determine the fewest number of each bill and coin needed to represent that amount, starting with the...


Write an application that prompts for and reads "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 (assuming that a ten-dollar bill is the maximum size needed). For example, if the value entered is 47.63, then the program should print the equivalent amount as:
4 ten dollar bills
1 five dollar bills
2 one dollar bills
2 quarters
1 dimes
0 nickels
3 pennies


Using your Eclipse / Java integrated development environment (IDE), develop and code a solution to Programming Project 2.11 from pages 94-95 of the text book.


P 2.13 Write a program that prompts for and reads the numerator and<br>ing the length of a square's side, then prints the square's perim-<br>PP 2.12 Write a program that prompts for and reads an integer represent-<br>age, college, and pet's name. Then print the following paragraph,<br>94<br>CHAPTER 2 Data and Expressions<br>Progromming<br>1 dimes<br>O nickles<br>3 pennies<br>PP 2.4<br>Write a program that prompts for and reads a person's name<br>inserting the appropriate data:<br>Hello, my name is name and I am age years<br>old. I'm enjoying my time at college, though<br>I miss my pet petname very much!<br>Create a version of the TempConverter application to convert<br>from Fahrenheit to Celsius. Read the Fahrenheit temperature<br>from the user.<br>eter and area.<br>PP 2.5<br>denominator of a fraction as integers, then prints the decimal<br>equivalent of the fraction.<br>Write a program that converts miles to kilometers. (One mile<br>equals 1.60935 kilometers.) Read the miles value from the user<br>as a floating point value.<br>PP 2.6<br>PP 2.7 Write a program that prompts for and reads integer values for<br>speed and distance traveled, then prints the time required for the<br>trip as a floating point result.<br>Write a program that reads values representing a time duration<br>in hours, minutes, and seconds and then prints the equivalent<br>total number of seconds. (For example, 1 hour, 28 minutes, and<br>42 seconds is equivalent to 5322 seconds.)<br>Create a version of the previous project that reverses the<br>tation. That is, read a value representing a number of seconds,<br>then print the equivalent amount of time as a combination of<br>hours, minutes, and seconds. (For example, 9999 seconds is<br>equivalent to 2 hours, 46 minutes, and 39 seconds.)<br>PP 2.8<br>PP 2.9<br>compu-<br>PP 2.10 Write a program that determines the value of the coins in a<br>jar and prints the total in dollars and cents. Read integer values<br>that represent the number of quarters, dimes, nickels, and<br>VideoNote<br>nennies.<br>Developing a solution<br>of PP 2.10.<br>PP 2.11 Write a program that prompts for and reads a double value rep-<br>resenting a monetary amount. Then determine the fewest number<br>of each bill and coin needed to represent that amount, starting<br>with the highest (assume that a ten-dollar bill is the maximum<br>size needed). For example, if the value entered is 47.63 (forty-<br>seven dollars and sixty-three cents), then the program should<br>print the equivalent amount as:<br>4 ten dollar bills<br>1 five dollar bills<br>2 one dollar bills<br>2 quarterS<br>

Extracted text: P 2.13 Write a program that prompts for and reads the numerator and ing the length of a square's side, then prints the square's perim- PP 2.12 Write a program that prompts for and reads an integer represent- age, college, and pet's name. Then print the following paragraph, 94 CHAPTER 2 Data and Expressions Progromming 1 dimes O nickles 3 pennies PP 2.4 Write a program that prompts for and reads a person's name inserting the appropriate data: Hello, my name is name and I am age years old. I'm enjoying my time at college, though I miss my pet petname very much! Create a version of the TempConverter application to convert from Fahrenheit to Celsius. Read the Fahrenheit temperature from the user. eter and area. PP 2.5 denominator of a fraction as integers, then prints the decimal equivalent of the fraction. Write a program that converts miles to kilometers. (One mile equals 1.60935 kilometers.) Read the miles value from the user as a floating point value. PP 2.6 PP 2.7 Write a program that prompts for and reads integer values for speed and distance traveled, then prints the time required for the trip as a floating point result. Write a program that reads values representing a time duration in hours, minutes, and seconds and then prints the equivalent total number of seconds. (For example, 1 hour, 28 minutes, and 42 seconds is equivalent to 5322 seconds.) Create a version of the previous project that reverses the tation. That is, read a value representing a number of seconds, then print the equivalent amount of time as a combination of hours, minutes, and seconds. (For example, 9999 seconds is equivalent to 2 hours, 46 minutes, and 39 seconds.) PP 2.8 PP 2.9 compu- PP 2.10 Write a program that determines the value of the coins in a jar and prints the total in dollars and cents. Read integer values that represent the number of quarters, dimes, nickels, and VideoNote nennies. Developing a solution of PP 2.10. PP 2.11 Write a program that prompts for and reads a double value rep- resenting 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: 4 ten dollar bills 1 five dollar bills 2 one dollar bills 2 quarterS
Jun 07, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here