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 "matchAndSort" in the Solution class.
10
+
11
11
This method will take array of Sim objects, search_circle String and search_rate double as parameters.
12
-
And will return another Sim array where the search_circle matches with the circle parameter of the original Sim array and the search_rate double is greater than the original array of Sim object's ratePerSecond attribute which is also sorted by means of balance attribute in descending order.
12
+
And will return another Sim array where the search_circle matches with the circle parameter of the original Sim array and
13
+
the search_rate double is greater than the original array of Sim object's ratePerSecond attribute which is also sorted by
14
+
means of balance attribute in descending order.
13
15
14
16
Write necessary getters and setters.
15
17
16
-
Before calling "matchAndSort" method in the main method, read values for four Sim objects referring the attributes in above sequence along with a String search_circle and a double search_rate.
17
-
Then call the "matchAndSort" method and write logic in main method to print the id's of the result obtained.
18
-
19
-
## Input
20
-
21
-
1
22
-
jio
23
-
430
24
-
1.32
25
-
mumbai
26
-
2
27
-
idea
28
-
320
29
-
2.26
30
-
mumbai
31
-
3
32
-
airtel
33
-
500
34
-
2.54
35
-
mumbai
36
-
4
37
-
vodafone
38
-
640
39
-
3.21
40
-
mumbai
41
-
mumbai
42
-
3.4
43
-
44
-
## Output
45
-
46
-
4
47
-
3
48
-
1
49
-
2
18
+
Before calling "matchAndSort" method in the main method, read values for four Sim objects referring the attributes in above
19
+
sequence along with a String search_circle and a double search_rate. Then call the "matchAndSort" method and write logic in
20
+
main method to print the id's of the result obtained.
0 commit comments