Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

in jGrasp sample output #1 set the number of the pennies to 568, compile your code and run it. you should get the following output

in jGrasp image text in transcribed
image text in transcribed
image text in transcribed
sample output #1 set the number of the pennies to 568, compile your code and run it. you should get the following output Welcome to the Coin Converter Tell many the number of the pennies you have, I will tell you the number of dollar bill, quarters, dimes, nickels and pennies 568 pennies are equal to: 5 dollar(s) 2 quarter (s) 1 dime (s) 1 nickel(s) 3 penny(s) sample output #2 Set the number of the pennies to 6789, compile your code, run your code. You should get the following output Welcome to the Coin Converter Tell many the number of the pennies you have, I will tell you the number of dollar bill, quarters, dimes, nickels and pennies 6789 pennies are equal to: 67 dollar (s) 3 quarter(s) 1 dime(s) 0 nickel(s) 4 penny (s) Objective In this assignment you will be practicing variable declaration, assignment statement, expression, string concatenation and java mathematical operations. problem you have been collecting pennies for some time and you want to know the exact amount of the money you have saved so far in terms of dollar, quarters, dime, nickel and penny, Write an application to convert the number of the pennies to its equivalent dollars, quarters, dimes, nickels and pennies, for example, 456 pennies are equivalent to 4 dollars, 2 quarters, 1 nickel and I penny. 167 cents are equivalent to one dollar, 2 quarters, 1 dime, I nickel and 2 peenies. preparation Watch the vide on converting millimeter to meter, centimeter , and millimeter Requirements your code should satisfy all the rubric criteria . you must have minimum two methods: main and another method to do the calculations must use variables to store numbers . must include block comments for each method your output must be correct and match the provide output you need to run your program two different times with different values to make sure the output is correct. Refer to the sample output you need to use the operations / and % repeatedly to find out the number of the dollars, quarters, dimes, nickels and pennies. Refer to the video posted on converting centimeter to meter, centimeter and milli meter Required methods public static void description (): This method describes what the program does. Refer to the sample output. public static void convert(): This method does all the calculations and uses print/println to display the result on the screen public static void main(String[] args): This method calls the methods description and the method calculate. public class coinConverterShell { public static void main(String[] args) { //your code } public static void description() { //your code } public static void convert() { //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 Principles Programming And Performance

Authors: Patrick O'Neil

1st Edition

1558603921, 978-1558603929

More Books

Students also viewed these Databases questions