blob: c4d1fc37eaeed3e9e887fbbf844aafa57d760d83 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
public class Song extends MusicalElement {
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 getTitle()+";"+getDuration()+";"+getContent()+";"+artist+";"+genre;
}
}
|