aboutsummaryrefslogtreecommitdiff
path: root/Song.java
diff options
context:
space:
mode:
authorMasfehico <clyhtsuriva@gmail.com>2020-12-07 18:26:18 +0100
committerMasfehico <clyhtsuriva@gmail.com>2020-12-07 18:26:18 +0100
commitec126de053cd1343e0c5778a56ea58045d0e3170 (patch)
treeeef3f4d3dc662028eac14bd5c6411f598a9c6ba1 /Song.java
parent863d326bd146fb08d9b8c6de03bde0e83f61c74a (diff)
Big update
Implementing the function to add songs. Cleaning a bit everywhere as well.
Diffstat (limited to 'Song.java')
-rw-r--r--Song.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/Song.java b/Song.java
index c7556b1..c4d1fc3 100644
--- a/Song.java
+++ b/Song.java
@@ -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;
+ }
+
+
}