diff options
Diffstat (limited to 'Song.java')
-rw-r--r-- | Song.java | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -1,7 +1,7 @@ public class Song extends MusicalElement { private String artist, genre; - public Song(int id, String title, int duration, String content, String artist, Genre genre) { - super(id, title, duration, content); + public Song(String title, int duration, String content, String artist, Genre genre) { + super(title, duration, content); this.artist=artist; this.genre=genre.name(); } @@ -10,4 +10,10 @@ public class Song extends MusicalElement { 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; + } + + } |