Computers and Technology

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.

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 00:10, MadiAbbott798
How does access indicates that a filter has been applied to a specific column
Answers: 1
image
Computers and Technology, 24.06.2019 10:00, ariyanadavid5989
1. which of these is not true about torsion bars? a. they can be used to adjust ride height b. they can be adjusted anytime since they don't affect alignment angles c. they attach between the frame and the lower control arm d. they twist to produce a spring effect
Answers: 1
image
Computers and Technology, 24.06.2019 22:00, sierrawalk2283
True or false technology is often discovered by accident
Answers: 2
image
Computers and Technology, 24.06.2019 22:30, rayniqueamee2002
When can you access the bios setup utility?
Answers: 1
Do you know the correct answer?
Question 2 In this question you are asked to calculate probabilties for the discrete uniform and exp...

Questions in other subjects:

Konu
Mathematics, 12.03.2021 18:40
Konu
Mathematics, 12.03.2021 18:40