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 "replenish" in the Solution class.
8
+
Create class Solution and implement static method "Replenish" in the Solution class.
10
9
This method will take array of Inventory objects and a limit int as parameters.
11
-
And will return another array of Inventory objects where the limit int is lesser than or equal to the original array of Inventory object's threshold attribute.
10
+
And will return another array of Inventory objects where the limit int is greater than or equal to the original array of
11
+
Inventory object's threshold attribute.
12
12
13
13
Write necessary getters and setters.
14
14
15
-
Before calling "replenish" method in the main method, read values for four Inventory objects referring the attributes in above sequence along with a int limit.
16
-
Then call the "replenish" method and write logic in main method to print "Critical Filling",if the threshold attribute is greater than 75. Else if the threshold attribute is between 50 and 75 then print "Moderate Filling". Else print "Non-Critical Filling"
17
-
18
-
## Input
19
-
20
-
1
21
-
100
22
-
50
23
-
50
24
-
2
25
-
200
26
-
60
27
-
40
28
-
3
29
-
150
30
-
35
31
-
45
32
-
4
33
-
80
34
-
45
35
-
40
36
-
45
37
-
38
-
## Output
39
-
40
-
2 Non-Critical Filling
41
-
3 Non-Critical Filling
42
-
4 Non-Critical Filling
15
+
Before calling "Replenish" method in the main method, read values for four Inventory objects referring the attributes in above
16
+
sequence along with a int limit.Then call the "Replenish" method and write logic in main method to print "Critical Filling",
17
+
if the threshold attribute is greater than 75. Else if the threshold attribute is between 50 and 75 then print
0 commit comments