Question 4. Suppose the total number of demand points covered by the three OPOs
ID: 3920252 • Letter: Q
Question
Question 4. Suppose the total number of demand points covered by the three OPOs cannot exceed 10. Explain in 10 sentences (or less) how to modify your java program code.
Resource Allocation The representative of Health Department of Texas wants to investigate the optimal allocation of organ procurement organizations (OPOs) for organ transplant. Location data Demand x 0 0 ???? 10 10.5 11 2.5 6 10 12 oPO114 21 24 28.53 25 26 25.5 4 30 32.5 -5 3 OPO2 OPO1 30.5 5.5 OPO2 20.5 5.5 OP03 | 25.5 | 3.5 Q1 (40 points). Write a program that can assign all demand points to the nearest or the farthest OPO given the location information above Program requirements 1. The distance must be calculated as follows Distance between A and B (x of A -x of B)A2 (y of A- y of B)A2 We assume the unit of distance is mile 2. The program asks the user to choose one of the allocation rules specified below (1) Rule 1: All demand points are assigned to the nearest OPO (2) Rule 2: All demand points are assigned to the farthest OPO 3. After the user chooses the rule, the program allocates the demand points folowing the rule the user chooses and prints out the allocation results The program must check to be sure that the user input is valid. The program keeps displaying a warning message until the user puts a valid input. If the user repeatedly enters an invalid input more than 3 time, the program displays an error message and terminates. 4. 5. Use selection(s), loop(s), and array(s) Sample Inputs/Outputs Invalid input! try again! Chose an allocation rule: 1-nearest rule, or 2-farthest rule:3 Chose an allocation rule: 1-nearest rule, or 2- farthest rule:1Explanation / Answer
Suppose the total number of demand points covered by the three OPOs cannot exceed 10. Explain in 10 sentences (or less) how to modify your java program code
Please let me know in case of any clarifications required. Thanks!
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.