aboutsummaryrefslogtreecommitdiff
path: root/Song.java
blob: 84e1e6d104aec25c80aed8449490a2d51da34a89 (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
/**<h1>Song<h1>
 * Song is using instanciating  MusicalElement and is Serializable.
 * */

public class Song extends MusicalElement{

	private static final long serialVersionUID = 2112880640160601826L;
	private String artist, genre;

	public Song(String title, int duration, String content, String artist, Genre genre) {
		super(title, duration, content);
		this.artist=artist;
		this.genre=genre.name();
	}

	public String getArtist(){return artist;}
	public String getGenre(){return genre;}
	public void setArtist(String artist){this.artist=artist;}
	public void setGenre(Genre genre){this.genre=genre.name();}

        public String toString() {
		return "Id : "+getId()+"\nTitle : "+getTitle()+"\nDuration : "+getDuration()+"\nContent : "+getContent()+"\nArtist : "+getArtist()+"\nGenre : "+getGenre();
        }
}