@@ -10,79 +10,40 @@ duration(minutes) -double.
1010
1111
1212
13- The above attributes should be private.Write Getter and Setter and
14-
15- parametrized constructor as required.
13+ The above attributes should be private.Write Getter and Setter and parametrized constructor as required.
1614
1715Create class Solution with main method.
1816
1917****************************************************************************
2018
21- Implement two static methods: findAvgOfCount and sortTypeByDuration in
22-
23- Solution Class.
19+ Implement two static methods: findAvgOfCount and sortTypeByDuration in Solution Class.
2420
2521
2622
2723findAvgOfCount Method:
24+ ----------------------------------------
25+ This method will take an array of Music objects and an int value as input parameters.The method will find out Average
26+ (as int) of count for those objects whose count is more than the given Count(int parameter passed).This method will return
27+ average if found.If there is no Type that matches then the method should return 0.
2828
29- This method will take an array of Music objects and an int value as input
30-
31- parameters.The method will find out Average (as int) of count for those
32-
33-
34- objects whose count is more than the given Count(int parameter passed).This
35-
36-
37- method will return average if found.If there is no Type that matches then
38-
39- the method should return 0.
40-
41-
42-
43- for this method- main method should print average ,if the returned value
44-
45- is not 0.If the returned value is 0 then main method should print
46-
47- "No playlist found".
48-
49-
29+ for this method- main method should print average ,if the returned value is not 0.If the returned value is 0 then main method
30+ should print "No playlist found".
5031
5132sortTypeByDuration method:
52-
53- This method will take an array of Music objects and an int value as input
54-
55- parameters.This method should return an array of Music objects in an
56-
57-
58- ascending order of their duration which are more than the given duration
59-
60- (int parameter passed) value.
61-
33+ -----------------------------------------
34+ This method will take an array of Music objects and an int value as input parameters.This method should return an array of
35+ Music objects in an ascending order of their duration which are more than the given duration (int parameter passed) value.
6236If there are no such objects ,then the method should return null.
6337
64-
65-
66- for this method-The main method should print the type from the returned
67-
68- Music object array if the returned value is not null.If the returned value
69-
70- is null then the main method should print "No playlist found with
71-
72- mentioned attribute".
38+ for this method-The main method should print the type from the returned Music object array if the returned value is not null.
39+ If the returned value is null then the main method should print "No playlist found with mentioned attribute".
7340
7441****************************************************************************
7542
76-
77-
7843Consider the below input and output:
7944
80-
81-
8245input1:
83-
84-
85-
46+ ------------
8647111
8748WorkOut
884910
@@ -103,25 +64,17 @@ Chill
1036420
10465
10566
106-
10767output1:
108-
68+ --------------------
1096925
110-
11170Childhood Jams
112-
11371Dance Party
114-
11572Chill
11673
11774
11875
119-
120-
121-
122-
12376input2:
124-
77+ -----------------------
12578111
12679Oldies but Goodies
1278017
@@ -142,10 +95,8 @@ Rainy day
142955000
14396
14497
145-
14698output 2:
147-
99+ -----------------------
148100No playlist found.
149-
150101No playlist found with mentioned attribute.
151102
0 commit comments