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, 22.06.2019 09:40
Sarah is having a hard time finding a template for her advertising business that she may be able to use at a later date and also make it available to her colleagues
Answers: 1
question
Computers and Technology, 22.06.2019 11:00
What are two of the most common reasons that peolpe who need mental health care do not access it?
Answers: 1
question
Computers and Technology, 22.06.2019 22:30
Alex’s family members live in different parts of the world. they would like to discuss the wedding plans of one of their distant relatives. however, alex wants all the family members to talk to each other simultaneously so that they can make decisions quickly. which mode of internet communication should they use? a. blog b. email c. wiki d. message board e. instant messaging
Answers: 2
question
Computers and Technology, 24.06.2019 09:10
  to change the number of rows and columns displayed by the excel object a. select the object and drag a size handle on the active object. b. deselect the object and drag a size handle of the object. c. deselect the object and drag a row or column divider of the object. d. select the object and drag a row or column divider on the active object.
Answers: 2
You know the right answer?
Question 2 In this question you are asked to calculate probabilties for the discrete uniform and exp...
Questions
Questions on the website: 13722363