Skip to content

Commit ac5778d

Browse files
committed
Music (IPA-35)
1 parent e1dd492 commit ac5778d

1 file changed

Lines changed: 17 additions & 66 deletions

File tree

Music_IPA.txt

Lines changed: 17 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -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

1715
Create 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

2723
findAvgOfCount 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

5132
sortTypeByDuration 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.
6236
If 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-
7843
Consider the below input and output:
7944

80-
81-
8245
input1:
83-
84-
85-
46+
------------
8647
111
8748
WorkOut
8849
10
@@ -103,25 +64,17 @@ Chill
10364
20
10465

10566

106-
10767
output1:
108-
68+
--------------------
10969
25
110-
11170
Childhood Jams
112-
11371
Dance Party
114-
11572
Chill
11673

11774

11875

119-
120-
121-
122-
12376
input2:
124-
77+
-----------------------
12578
111
12679
Oldies but Goodies
12780
17
@@ -142,10 +95,8 @@ Rainy day
14295
5000
14396

14497

145-
14698
output 2:
147-
99+
-----------------------
148100
No playlist found.
149-
150101
No playlist found with mentioned attribute.
151102

0 commit comments

Comments
 (0)