# Lastinitialfirstinitialunit2ch10 | Computer Science homework help

The files must be called <LastInitialFirstInitialUnit2Ch10.java>

Proper coding conventions required the first letter of the class start with a capital letter and the first letter of each additional word start with a capital letter.

Only submit the .java file needed to make the program run. Do not submit the .class file or any other file.

5%

Style Components

Include properly formatted prologue, comments, indenting, and other style elements as shown in Chapter 2 starting page 64 and Appendix 5 page 881-892.

5%

Topics covered in chapter

Topics with * are covered in this assignment.

*Array List class

*Storing Primitives in Array List

*Array List vs standard Array

List interface

Queues, Stacks, and Array Deque class

*Java Collections

Basic Requirements

Write a program that simulates rolling 2 dice and keeps track of the results.

This is similar to the previous assignment but is using Array Lists rather than regular Array’s.

LiFiUnit2Ch10.java

 Declare an Array List of size 11 to track rolls 2-12. (an unsorted Array List)

 Ask how many rolls are to be performed

 Create 2 random numbers, each between 1 and 6 to simulate the dice

 Fill each elements in the Array List with total of the 2 dice.

 Store the number of rolls of 2 in the first element, 3 in the second, 4 in the third, etc up to 12 in the 11th element.

 Print a table showing the rolls, historical and percentage of total rolled (see

90%

sample).

 After the table, print a total row which calculates the total rolls and the total percentage. Ensure to calculate these values and don’t just hard code based on number of rolls at the top.

 Ensure the dashed line under historical is only as long as the value below it (see example below).

o Hint: You can use the Integer wrapper class to convert the integer to a string and then determine the length of it.

 Finally, print out which roll was rolled most and how many times it was rolled. (Seem sample)

 Hint: Use the collections class to search for the max value in your arrayList

Sample output is provided below. Be sure to mimic it exactly except for the number of rolls, historical, and percentage which will change.

10%

NOTE: Complete your activity and submit it by clicking “Submit Assignment”

Total Percentage

100%

Sample Your output will vary based on the number of rolls entered

Calculate the price
Pages (550 words)
\$0.00
*Price with a welcome 15% discount applied.
Pro tip: If you want to save more money and pay the lowest price, you need to set a more extended deadline.
We know how difficult it is to be a student these days. That's why our prices are one of the most affordable on the market, and there are no hidden fees.

Instead, we offer bonuses, discounts, and free services to make your experience outstanding.
How it works
Receive a 100% original paper that will pass Turnitin from a top essay writing service
step 1
Fill out the order form and provide paper details. You can even attach screenshots or add additional instructions later. If something is not clear or missing, the writer will contact you for clarification.
Pro service tips
How to get the most out of your experience with Australia Assessments
One writer throughout the entire course
If you like the writer, you can hire them again. Just copy & paste their ID on the order form ("Preferred Writer's ID" field). This way, your vocabulary will be uniform, and the writer will be aware of your needs.
The same paper from different writers
You can order essay or any other work from two different writers to choose the best one or give another version to a friend. This can be done through the add-on "Same paper from another writer."
Copy of sources used by the writer
Our college essay writers work with ScienceDirect and other databases. They can send you articles or materials used in PDF or through screenshots. Just tick the "Copy of sources" field on the order form.
Testimonials
See why 20k+ students have chosen us as their sole writing assistance provider
Check out the latest reviews and opinions submitted by real customers worldwide and make an informed decision.
Psychology
Great work
Customer 463995, April 3rd, 2023
Entertainment & Gaming
Great work.
Customer 452441, April 29th, 2022
Senior Services
Outstanding quality.
Customer 452441, April 13th, 2022
Education
WELL DONE , THANK YOU
Customer 463813, April 12th, 2023
Avoid plagiarism.
Customer 459305, March 29th, 2022
Healthcare & Medical
Excellent work!
Customer 463337, November 18th, 2022
Social Work and Human Services
Excellent.
Customer 460073, June 20th, 2022
Other
Good work.
Customer 455119, May 27th, 2022
Nursing
Thank you so much for the great paper!
Customer 454007, May 31st, 2020
Retail
Good
Customer 463469, October 18th, 2022
Nursing
Thanks a lot Peter
Customer 453199, March 28th, 2020
Other
Although I did not receive my paper on time, the customer care team ensured that I would receive a quality paper. I am pleased with the revision of this paper.
Customer 452455, March 2nd, 2023
11,595
Customer reviews in total
96%
Current satisfaction rate
3 pages
Average paper length
37%
Customers referred by a friend