Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

A representative of the health department wants to investigate optimal allocatio

ID: 3711231 • Letter: A

Question

A representative of the health department wants to investigate optimal allocation strategy of ambulances in case of emergency. Write a java program that can assign all demand points to a nearest dispatch station given the location information below.

#

X

y

1

1

5

2

3

30

3

5

10

4

9

24

5

11

22

6

11

20

7

9

4

8

17

25

9

22

30

10

25

19

11

21

5

12

28

32

13

30

31

14

31

1

15

8

35

16

26

2

17

35

15

distance between branch A and B = |x of A – x of B| + |y of A – y of B|

e.g. distance between 1 and 3= |1-5|+|5-10| = 9

#

X

y

1

1

5

2

3

30

3

5

10

4

9

24

5

11

22

6

11

20

7

9

4

8

17

25

9

22

30

10

25

19

11

21

5

12

28

32

13

30

31

14

31

1

15

8

35

16

26

2

17

35

15

Explanation / Answer

Note: You are not proving point to find nearest so i find out the 2 closest point here.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote