diff options
-rw-r--r-- | MusicalElement.java | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/MusicalElement.java b/MusicalElement.java index c409ce7..b5f6446 100644 --- a/MusicalElement.java +++ b/MusicalElement.java @@ -1,12 +1,11 @@ -interface Item { - int getId(); - String getTitle(); - int getDuration(); - } +/** The MusicalElement contains the base of songs and audibooks. + * It is the abstract class they will take. + * We use the classical get and set here.*/ -class MusicalElement implements Item { +class MusicalElement { private int id, duration; private String title, content; + public MusicalElement(int id, String title, int duration, String content) { this.id=id; this.title=title; @@ -17,6 +16,12 @@ class MusicalElement implements Item { public int getId(){return id;} public String getTitle(){return title;} public int getDuration(){return duration;} + public String getContent(){return content;} + + public void setId(){this.id=id;} + public void setTitle(){this.title=title;} + public void setDuration(){this.duration=duration;} + public void setContent(){this.content=content;} |