Application which tests the random number generation

Assignment Help PL-SQL Programming
Reference no: EM13690072

You need to prepare a java program.

Question:  Write 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 should be a floating point result, and should be displayed with 2 digits after the decimal point.

Write a Java application which tests the random number generation abilities of Java. Random number generation is explained below.

Your application should 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 need to generate a random number between 1 and 6 to simulate rolling each dice. Keep track of the result of each roll using an array that is indexed by the sum of the roll of the two dice.

Output your result in a table which shows each value and the number of times that value was rolled.

Solve this problem using java programming concepts.

Reference no: EM13690072

Questions Cloud

How many moles of calcium fluoride is produced : Problem- When 0.54 moles of CaCO3 are put in a reaction vessel with plenty of aluminum fluoride, how many moles of calcium fluoride is produced
What is the java source filename extension : What is the Java source filename extension? What is the Java bytecode filename extension and write a Java statement to display the string The value is 100 to a user in a plain dialog box.
Write a balanced equation for the reaction : Problem- Ethyl acetate reacts with H2 in the presence of a catalyst to yield ethyl alcohol- C4 H8O2(l) +H2(g)-------> C2H6O6(l) Part a) Write a balanced equation for the reaction.
Calculate the ph of a solution made by mixing equal volumes : Problem- Calculate the pH of a solution made by mixing equal volumes of a solution of HCl with a pH of 1.44 and a solution of HNO3 with a pH of 2.74. Assume the volumes are additive
Application which tests the random number generation : Write a Java application that inputs three integers from the user and displays the sum, average, product, smallest and largest of the numbers.
How many moles of cac2o4 are present in this kidney stone : Problem- The principal component of many kidney stones is calcium oxalate, CaC2O4. A kidney stone recovered from a typical patient contains 8.5 x 10^20 formula units of calcium oxalate. How many moles of CaC2O4 are present in this kidney stone
Calculate the ph at the first equivalence point : Problem- 1) A 0.030 M solution was prepared by dissolving dipotassium cysteine, K2C in water. Then 40.0mL of this solution was titrated with 0.060 M HClO4. Calculate the pH at the first equivalence point
What is the wavelength of energy emitted from by hydrogen : Problem- What is the wavelength of energy emitted from by hydrogen atoms when they undergo n=5 to n=4 transitions
What is the mass in grams of 0.0015 mol of aspirin : Problem- What is the mass in grams of 0.0015 mol of aspirin, C9H8O4. How many aspirin moleclues are there in this 0.0015 mol sample

Reviews

Write a Review

PL-SQL Programming Questions & Answers

  Create a database model

Create a database model and Submit the table creation statements for the Database Model.

  Write pl-sql procedures and functions

Write PL/SQL procedures and functions to populate and query that database

  Sql questions

Write a query to display using the employees table the EMPLOYEE_ID, FIRST_NAME, LAST_NAME and HIRE_DATE of every employee who was hired after to 1 January, 1995.

  Run the lab_03_01.sql script

Run the lab_03_01.sql script in the attached file to create the SAL_HISTORY table. Display the structure of the SAL_HISTORY table.

  Write sql queries

Write a query to display the last name, department number, and salary of any employee whose department number and salary both match the department number and salary of any employee who earns a commission.

  Explaining sql insert statement to insert new row in cds

Write down a SQL insert statement to insert new row in "CDS" table.

  Write down name of actors in ascending order

Write down actors (or actress, your choice, but not both) who have won at least two (2) Academy Awards for best actor/actress. Provide the actor name, movie title & year. Order the result by actor name."

  What is an sql injection attack

What is an SQL injection attack? Explain how it works, and what precautions must be taken to prevent SQL injection attacks.What are two advantages of encrypting data stored in the database?

  Determine resonant frequency in series rlc resonant circuit

Given the series RLC resonant circuit in the figure, operating at variable frequency, determine: The resonant frequency ω o ,  The circuit’s quality factor Q , The cut-off frequencies, f 1  & f 2  and the bandwidth BW

  Query that uses cube operator to return lineitemsum

Write summary query which uses CUBE operator to return LineItemSum (which is the sum of InvoiceLineItemAmount) group by Account(an alias for AccountDesciption).

  Query to show customers were missing for existing orders

As DBA, your manager called a meeting and asked why there are so many orders for customers that don't exist in the customer table. Write query which would shows which customers were missing for existing orders. Use a join or a subquery.

  Sql query into a relational algebra statement

Turn this SQL query into a relational algebra statement? SELECT Request.reqfor, Ordering.invamt, Ordering.invnbr, Ordering.invdat

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd