blob: e8766a3cbc4bc8a8ca8fe6c4fee69a337484c306 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
import java.util.ArrayList;
public class Album {
private int id, duration, date;
private String title, artist;
private ArrayList<String> songs = new ArrayList<String>();
public Album(int id, String title, int duration, String artist, int date, ArrayList<String> songs) {
this.id=id;
this.title=title;
this.duration=duration;
this.artist=artist;
this.date=date;
this.songs=songs;
}
public int getId(){return id;}
public String getTitle(){return title;}
public int getDuration(){
//Addition of the duration of the songs inside the album
return duration;
}
}
|