Question: Problem 2 In a class called H1P2, write a method called change that takes as input a total amount of money in cents and computes

 Problem 2 In a class called H1P2, write a method called

Problem 2 In a class called H1P2, write a method called change that takes as input a total amount of money in cents and computes the exact amount of money in dollars, quarters, dimes, nickels and cents, thern prints the following message to the screen: cents corresponds to: dollars, quarters, dimes, nickels and cents. where is the computed number of dollars and so on. Write another method called inCents that takes as input five integers: dollars, quarters, dimes, nickels and cents in this order, and computes the exact amount of money in cents, then prints the following message to the screen: kinput dollars> dollars, quarters, dimes, nickels and cents correspond to: cents You should test your methods change and inCents in the main method using a Scanner object with appropriate messages prompting the user to enter the required information for each method. Test each method 5 times and copy/paste each prompt session in a txt file. This problem should be submitted to Canvas in a file called H1P2.java. You should also submit a txt file of your tests called H1P2tests.txt

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!