diff options
author | Masfehico <clyhtsuriva@gmail.com> | 2020-12-07 14:05:46 +0100 |
---|---|---|
committer | Masfehico <clyhtsuriva@gmail.com> | 2020-12-07 14:05:46 +0100 |
commit | c620b561aa64b342dc9f5416a3d68f124f53117b (patch) | |
tree | 50b2b6a0bc3b9ee7b3c72caf959307b91af0da1f | |
parent | 13d0859dcd9793212a71d7678328b879e11e2691 (diff) |
Finishing MusicalElement.java
-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;} |