Question: Write a method that asked the user for an expensive and allows to adding more expensive as many times as would like. Print a summary

 Write a method that asked the user for an expensive and

Write a method that asked the user for an expensive and allows to adding more expensive as many times as would like. Print a summary total number expenses, total expenses, and average cost per expense (e.g. "4 items, $20 total spent, $5 over goes per item". Finally, return (as opposed to printing out) the total expenses (e.g. in the above example, you would return 20). Assume that the user will always give a positive non-zero number (i.e. no input validation required for this method). (Suggested time spent;

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!