You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create class Solution and implement static method "findAverageOfRuns" in the Solution class.
11
10
This method will take array of Player objects and a target int as parameters.
12
-
And will return another double array where the target int is lesser than or equal to the original array of Player object's matchesPlayed attribute and contains the average run scored by each player satisfying above condition.
11
+
And will return another double array where the target int is lesser than or equal to the original array of Player object's
12
+
matchesPlayed attribute and contains the average run scored by each player satisfying above condition.
13
13
14
14
Write necessary getters and setters.
15
15
16
-
Before calling "findAverageOfRuns" method in the main method, read values for four Player objects referring the attributes in above sequence along with a int target.
17
-
Then call the "findAverageOfRuns" method and write logic in main method to print "Grade A",if the calculated averageRun value is 80 to 100. Else if the averageRun value is between 50 and 79 then print "Grade B". Else print "Grade C"
18
-
19
-
## Input
20
-
21
-
100
22
-
Sachin
23
-
5
24
-
150
25
-
13000
26
-
101
27
-
Sehwag
28
-
4
29
-
120
30
-
10000
31
-
103
32
-
Dhoni
33
-
7
34
-
110
35
-
7000
36
-
104
37
-
Kohli
38
-
15
39
-
57
40
-
4400
41
-
100
42
-
43
-
## Output
44
-
45
-
Grade A
46
-
Grade A
47
-
Grade B
16
+
Before calling "findAverageOfRuns" method in the main method, read values for four Player objects referring the attributes
17
+
in above sequence along with a int target.
18
+
Then call the "findAverageOfRuns" method and write logic in main method to print "Grade A",if the calculated averageRun
19
+
value is 80 to 100. Else if the averageRun value is between 50 and 79 then print "Grade B". Else print "Grade C".
0 commit comments