aboutsummaryrefslogtreecommitdiff
path: root/AudioBook.java
diff options
context:
space:
mode:
Diffstat (limited to 'AudioBook.java')
-rw-r--r--AudioBook.java96
1 files changed, 93 insertions, 3 deletions
diff --git a/AudioBook.java b/AudioBook.java
index 9f6ba56..1e6f0e3 100644
--- a/AudioBook.java
+++ b/AudioBook.java
@@ -1,9 +1,44 @@
+/*
+ * Name : AudioBook
+ *
+ * Description : The AudioBook class is used to create audiobooks while extending MusicalElement
+ *
+ * Version : 1.0
+ *
+ * Date : 28/12/2020
+ *
+ * Copyright : Aimeric ADJUTOR
+ */
+
+/**
+ * The AudioBook class is used to create audiobooks while extending MusicalElement.
+ *
+ * @version 1.0
+ *
+ * @see MusicalElement
+ * @author Aimeric ADJUTOR
+ */
public class AudioBook extends MusicalElement {
private static final long serialVersionUID = -7145972304319088676L;
private String author, language, category;
+/**
+ * Constructor method.
+ *
+ * @param title String
+ * @param duration int
+ * @param content String, path to the mp3 file
+ * @param author String
+ * @param language Language
+ * @param category Category
+ *
+ * @see Language
+ * @see Category
+ *
+ * @author Aimeric ADJUTOR
+ * */
public AudioBook(String title, int duration, String content, String author, Language language, Category category) {
super(title, duration, content);
this.author=author;
@@ -11,16 +46,71 @@ public class AudioBook extends MusicalElement {
this.category=category.name();
}
-
+/**
+ * This method is used to give the author of the audiobook.
+ *
+ * @return It returns the author, which is a String
+ *
+ * @author Aimeric ADJUTOR
+ * */
public String getAuthor(){return author;}
+
+/**
+ * This method is used to give the language of the audiobook.
+ *
+ * @return It returns the language, which is a String because the constructor use the name method of the Language object.
+ *
+ * @see Language
+ * @author Aimeric ADJUTOR
+ * */
public String getLanguage(){return language;}
+
+/**
+ * This method is used to give the category of the audiobook.
+ *
+ * @return It returns the category, which is a String because the constructor use the name method of the Category object.
+ *
+ * @see Category
+ * @author Aimeric ADJUTOR
+ * */
public String getCategory(){return category;}
+
+/**
+ * Basic method to set the author of audiobook.
+ *
+ * @param author String
+ *
+ * @author Aimeric ADJUTOR
+ * */
public void setArtist(String author){this.author=author;}
- public void setGenre(Language language){this.language=language.name();}
- public void setCategory(Category category){this.category=category.name();}
+/**
+ * Basic method to set the language of the audiobook using the name method from the Language object.
+ *
+ * @param language Language
+ *
+ * @see Language
+ *
+ * @author Aimeric ADJUTOR
+ * */
+ public void setGenre(Language language){this.language=language.name();}
+/**
+ * Basic method to set the category of the audiobook using the name method from the Category class.
+ *
+ * @param category Category
+ *
+ * @author Aimeric ADJUTOR
+ * */
+ public void setCategory(Category category){this.category=category.name();}
+/**
+ * Basic method to "configure" what does a print of this object actually does.
+ *
+ * @return String, using the object's methods
+ *
+ * @author Aimeric ADJUTOR
+ * */
public String toString() {
return "Id : "+getId()+"\nTitle : "+getTitle()+"\nDuration : "+getDuration()+"\nContent : "+getContent()+"\nAuthor : "+getAuthor()+"\nLanguage : "+getLanguage()+"\nCategory : "+getCategory();
}