Question: Write a program called Ch 2 _ LotterySpending that prompts the user to enter the dollar amount won in the lottery and the number of

Write a program called Ch2_LotterySpending that prompts the user to enter the dollar amount won in the lottery and the number of years that he/she wants it to last. Calculate the maximum monthly spending amount so that the person can spend to avoid running out of money early. Include all team members' names as comments at the top of the file name. Submit a java file. No other file format will be accepted. Sample runs are shown below.---| Sample Run 1|-----Enter prize amount and number of years to last: 1000000020Prize Money: $10,000,000.00Number of years to last: 20Number of months to last: 240Maximum monthly spending: $41,666.67---| Sample Run 2|-----Enter prize amount and number of years to last: 1500000040Prize Money: $15,000,000.00Number of years to last: 40Number of months to last: 480Maximum monthly spending: $31,250.00---| Sample Run 3|-----Enter prize amount and number of years to last: 6000000025Prize Money: $60,000,000.00Number of years to last: 25Number of months to last: 300Maximum monthly spending: $200,000.00

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 Programming Questions!