From c620b561aa64b342dc9f5416a3d68f124f53117b Mon Sep 17 00:00:00 2001 From: Masfehico Date: Mon, 7 Dec 2020 14:05:46 +0100 Subject: Finishing MusicalElement.java --- MusicalElement.java | 17 +++++++++++------ 1 file 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;} -- cgit v1.2.3