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

  Question 1 calculate the tax on an ordercomplete the

question 1. calculate the tax on an ordercomplete the following steps to create a procedure to calculate the tax on an

  Write an sql statement to produce a single column called

write an sql statement to produce a single column called itemlocation that combines the skudescriptionthe phrase is

  Explaining sql insert statement to insert new row in cds

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

  Write pl-sql block to display the last name of people

Write a PL/SQL block that displays the last name and salary of the following people. Each of these can be done separately as PL/SQL, first to test and get the output lines then encapsulated in the procedure.

  Relational schema of a firm database - write a sql query

Display the vendor ID and vendor name of the items whose item quantity is the largest and display the item ID and item quantity of all items whoseitem quantity is less than the average quantity. Also display the average quantity

  Populate the tables with test data

Credit will be given to queries that are not trivial, for example, "SELECT * FROM Tablename" is unlikely to gain more than one mark. SQL Developer can be used to produce the queries and populate the tables.

  Write sql statement to create stored procedure

Write SQL statement which creates stored procedure with one int input parameter. The stored procedure selects the supplierId field and the total of all Count field values for each group of supplierId's from the Part table.

  Question for database schema

The patient information along with the ID of any prescribing doctor for each patient and the prescription information along with patient name, DOB, medication brand name, and prescribing doctor name sorted by most recent date.

  Implement the tables in oracles 11g relational database

Explain the security mechanisms available for a database and how the data will be protected.

  Submit the table creation statements for the database model

submit the table creation statements for the database model. submit them all in a single script file.also submit a

  How to defeat sql injection attacks

List the SQL commands you will use to create your database tables. Note: Be sure that each table has at least ten records that you create so you will be able to produce reports later on.

  F does not logically imply

Given R = (J,K,L ) and the set F of FDs J -> K and L -> K , show that F does NOT logically

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