Find your question
and Get expert's answers*
Homework Help
*Click here to submit
Refer a Friend
Discount up to 15%*
Prepared References
Save up to 50%*
Homework Help >> JAVA Programming
  Java application testing the random number  

Do the given two programs:

Question: Write down a Java application that inputs three integers from the user and displays the sum, average, product, smallest and largest of the numbers. Use a Scanner object to get the input from the user. Use System.out to output the results. The average must be a floating point result, and must be displayed with 2 digits after the decimal point.

Question: Write down a Java application that tests the random number generation abilities of Java. Random number generation is described below. Your application must simulate rolling a pair of dice some number of times. Use a JOptionPane to ask the user how many times the dice should be rolled. Each dice roll can be a value between 1 and 6, so rolling 2 dice will result in values between 2 and 12. You require generating a random number between 1 and 6 to simulate rolling each dice. Keep track of the result of each and every roll by using an array which is indexed by the sum of the roll of the two dice. Output your result in a table that shows each value (that is, 2 – 12) and the number of times that value was rolled.

The program should have the given structure:

1) The major function declares the counting array and gathers input from the user.

2) The separate function is called which takes an integer array parameter and also the number of dice rolls to execute. This function rolls the dice the required number of times and employs the array provided to count the number of times each value is rolled.

3) The main program takes the count data from the array, formats it and displays it as explained above.

Your final programming document must contain in the given order:

1) Screen capture of the first program followed by the source code.

2) Screen capture of the second program followed by the source code.

Ask an Expert for Solution

Ask an Expert for Answer Java application testing the random number

Request for Solution Files

Expected delivery within 24 Hours

Course: JAVA Programming

Ref. No:- TGS0325




Like US:-
Assignment Help

Ask an Expert & Get Answer

  • Quality work delivery
  • 100% Plagiarism free
  • Time on delivery
  • Privacy of work
Order Now
More JAVA Programming Questions


Java socket, hello, I need to this assignment done in net beans . and I want comment in code .also screen shots of running program and written documen
According to my lecturer, I need the tutor to display the 'program output' of the collision results implemented by BirthdayAttack.java in a output.t
The scenario is inspired by a Library Management System (LIMS). For the first version of the project, the LIMS is a very basic one, allowing just fo
List three debugging techniques, within the debugger, that can be used to locate logical error in the Java code. For each of these tools, explain wh
Which parts of the assignment were you not able to complete fully? For each, explain why you were unable to complete this part and what steps you to
For this assignment, you are required to develop a Graphical User Interface (GUI) Java Program to demonstrate you can use Java constructs including
Write an application that uses an Array to store 10 messages of type String. You will store this Array with 10 messages of your choosing.
For the URLs in the keyword list, sort them by either the number of times the keyword appearing in the pages or the popularity of the pages.
Java socket, hello, I need to this assignment done in net beans . and I want comment in code .also screen shots of running program and written documen
Using JOptionPanes to handle your input and output, produce a Java program which, given three sides of a triangle, determines whether the triangle i