Question: JAVA PROGRAMMING [H4-1] (Rollstats.java) { numRoll==1000 } Write an application that reads an int numRolls from the user, then repeats the following numRoll times: generate

JAVA PROGRAMMING

JAVA PROGRAMMING [H4-1] (Rollstats.java) { numRoll==1000 } Write an application that readsan int numRolls from the user, then repeats the following numRoll times:

[H4-1] (Rollstats.java) { numRoll==1000 } Write an application that reads an int numRolls from the user, then repeats the following numRoll times: generate a random int between 1 and 6 (simulate a roll of a single die), then update the total roll count for that particular roll value. Thus, you'll need 6 int variables to count how many rolls occur for each of 1, 2, 3, 4, 5, and 6. After the loop ends, print out the roll counts for each roll value. [H4-3] (Calculation.java) LiAmt==1500.00, iRate==10.0% } Write an application that prompts the user to enter an initial savings deposit as a double value iAmt in dollars, followed by an annual double interest rate iRate, given in % (your code should divide this input by 100.0 to get the dimensionless quantity to use in your calculations). Then print out a table as follows showing the growth of your i Amt savings as it earns iRate interest, compounded yearly over the first 5 years. For iAmt == 100.00 and iRate == 6.7%, your table should look something like this: Year # iAmt Cumulative Interest 0 1 2 3 4 5 $100.00 $104.70 $109.62 $114.77 $120.16 $125.82 $0.00 $6.70 $9.62 $14.77 $20.16 $25.82 Use one or more tabs (\t) between columns in the table (including in the header) and be sure that dollar amounts begin with $ and have exactly two decimals. Don't worry about precise formatting. Note that iAmt* (1+iRate) for any year gives the value of iAmt in the next row of the table. The cumulative interest is that earned in each year before and including the current one. Suggestion: use Stdout: printf ("$%.2f", 6.7) to print out $6.70

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!