subject

Question 2 In this question you are asked to calculate probabilties for the discrete uniform and exponential distribution. Make changes to H3_Q2.java to accomplish the following tasks. a. Print a menu to the screen asking the user to either type the number 1 to choose "discrete uniform" or the number 2 to choose "exponential". The tool should print out an error message and exit if the user types in anything other than one of those two numbers. b. If the user selects discrete uniform, the program should request a lower bound a, an upper bound b and value of x from the user. Your code should check that all values are integers and that the upper bound is greater than the lower bound. The code should also check that a ≤ x ≤ b. c. If the user selects exponential then the program should request a value of λ and x. Your should check that both values are doubles and that x > 0. d. Using the distribution chosen by the user, calculate P(X = x) and P(X ≤ x) and display the results to the screen with appropriate labels.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 20:20
Sometimes writers elaborate on the truth when recalling past events so they can enhance their narrative essay with more interesting descriptions. do you feel that published writers should or should not embellish real life events just to make their stories more interesting?
Answers: 2
question
Computers and Technology, 22.06.2019 18:10
How can i delete permalinks from a word press site?
Answers: 1
question
Computers and Technology, 22.06.2019 22:30
The qwerty keyboard is the most common layout of keys on a keyboard
Answers: 3
question
Computers and Technology, 24.06.2019 16:00
Read these lines from beowulf.often scyld scefing seized mead-benches from enemytroops, from many a clan, he terrified warriors, even thoughfirst he was found a waif, best explains why the author includes this information in theexposition? a. to emphasize that a hero must learn to be fierceb. to remember the famous story of a popular heroc. to express sadness about losing the old heroesd. to see whether people still respect the old heroes
Answers: 1
You know the right answer?
Question 2 In this question you are asked to calculate probabilties for the discrete uniform and exp...
Questions
question
Mathematics, 25.08.2019 08:30