Question: Write method in java 2. We have that I gross 144 of something, 1 dozen 12 of something, and 1 of something is just one

Write method in java
 Write method in java 2. We have that I gross 144
of something, 1 dozen 12 of something, and 1 of something is

2. We have that I gross 144 of something, 1 dozen 12 of something, and 1 of something is just one of something. Wally's Widgets sells a gross of widgets at the cost of $80, a dozen widgets at a cost of S10, and single widgets less than a dozen at the cost of $1 per widget. You are to write the code for a method that returns the bill for a given number of widgets as per the above scheme, one that breaks a number down into grosses, dozens and units to find the (cheapest) bill Wally will make for a given number. I have provided 10 sample runs on the Question 2 sheet with different order values as inputs. You need not include the breakdown display in your code (as I have), just simply write the code that returns the bill Wally will write you. The call to the code of the method you must write is shown in bold

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!