Write a program Pay.java to calculatethe amount of money a person would earn over a period of time.Assume the current salary is $50,000, salary would increase 4% ayear and there is also a yearly bonus between $2000 and $6000. For the purpose of the calculation, the bonus will be arandom number between $2000 and $6000.
- Print out the person’s yearly earnings for the next 5years.
- Using loop structure determine the number of years needed toaccumulate 1 million dollars in total overall earnings
Sample output should look like this
Year Salary Bonus YearTotal Overall Total
1 $52,000 $3,242 $55,242 $55,242
2 $54,080 $2,771 $56,851 $112,093
3 $56,243 $5,325 $61,568 $173,661
4 $58,493 $5,200 $63,693 $237,354
5 $60,833 $5,912 $66,745 $304,099
Write a program Pay.java to calculate the amount of money a person would earn over a period of time. Assume the current
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am