Question: Find the Median Objective: Write a program that randomly populates an array of size 100, sorts it, and then finds the median. The random numbers

Find the Median

Objective:

Write a program that randomly populates an array of size 100, sorts it, and then finds the median. The random numbers must be from 0-99 and all integer values. Also since there is an even set of numbers the median is found by taking the mean of the two middle numbers (In other words the 50th and 51st).

You have to code your own sorting method. You may not use a built in java sorter.

Keep in mind the 50th and 51st correspond to the number of items not necessarily the index of the array.

Comment your code

Example Dialog:

Random array

13

80

93

90

46

56

97

88

81

14

23

99

91

8

95

80

86

53

73

38

93

9

95

8

35

49

74

70

8

50

48

2

72

96

17

75

10

10

55

33

39

37

92

12

68

99

98

94

41

43

5

61

71

95

81

89

8

92

8

68

60

14

36

99

36

44

90

45

99

28

22

80

68

37

51

63

63

81

79

24

33

62

8

2

88

61

79

59

48

7

37

57

7

7

36

39

23

48

32

39

Sorted array

2

2

5

7

7

7

8

8

8

8

8

8

9

10

10

12

13

14

14

17

22

23

23

24

28

32

33

33

35

36

36

36

37

37

37

38

39

39

39

41

43

44

45

46

48

48

48

49

50

51

53

55

56

57

59

60

61

61

62

63

63

68

68

68

70

71

72

73

74

75

79

79

80

80

80

81

81

81

86

88

88

89

90

90

91

92

92

93

93

94

95

95

95

96

97

98

99

99

99

99

Median is 52

i need it by drjava please

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!