aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMasfehico <clyhtsuriva@gmail.com>2020-11-23 16:15:21 +0100
committerMasfehico <clyhtsuriva@gmail.com>2020-11-23 16:15:21 +0100
commit2a265d2f8787174337df4d5fc83e206ddd3289c4 (patch)
tree6e1c8a21ea36010f8435e4970db05d184da685ac
parent12e26df466421e41f40f2b353bd39af2f87f416f (diff)
Musical elements updated and jMusicHub basic creation
-rw-r--r--Album.java18
-rw-r--r--AudioBook.java12
-rw-r--r--Song.java3
-rw-r--r--jMusicHub.java44
4 files changed, 74 insertions, 3 deletions
diff --git a/Album.java b/Album.java
index e69de29..cdd39db 100644
--- a/Album.java
+++ b/Album.java
@@ -0,0 +1,18 @@
+import java.util.ArrayList;
+
+public class Album {
+ private int id, duration, date;
+ private String title, artist;
+ private ArrayList<String> songs = new ArrayList<String>();
+ public Album(int id, String title, int duration, String artist, int date, ArrayList songs) {
+ this.id=id;
+ this.title=title;
+ this.duration=duration;
+ this.artist=artist;
+ this.date=date;
+ this.songs=songs;
+ }
+
+
+
+}
diff --git a/AudioBook.java b/AudioBook.java
index e69de29..d53a899 100644
--- a/AudioBook.java
+++ b/AudioBook.java
@@ -0,0 +1,12 @@
+public class AudioBook extends MusicalElement {
+ private String author, language, category;
+ public AudioBook(int id, String title, int duration, String content, String author, String language, String category) {
+ super(id, title, duration, content);
+ this.author=author;
+ this.language=language;
+ this.category=category;
+ }
+
+
+
+}
diff --git a/Song.java b/Song.java
index b07bb81..640059e 100644
--- a/Song.java
+++ b/Song.java
@@ -5,7 +5,4 @@ public class Song extends MusicalElement {
this.artist=artist;
this.genre=genre;
}
-
-
-
}
diff --git a/jMusicHub.java b/jMusicHub.java
index e69de29..99e8342 100644
--- a/jMusicHub.java
+++ b/jMusicHub.java
@@ -0,0 +1,44 @@
+import java.util.Scanner;
+
+
+/** <h1>jMusicHub</h1>
+ *
+ * The jMusicHub class is basically the app.
+ * It is used to launch the whole process.
+ *
+ * @author Aimeric ADJUTOR
+ * @version 1.0
+ * @since 2020-11-13
+ * */
+
+public class jMusicHub {
+
+ public static void main(String[] args) {
+
+ System.out.println("Welcome to the jMusicHub !");
+
+ Scanner scan = new Scanner(System.in);
+ String userInput; //Used to get the user's inputs.
+
+ System.out.println("Starting extraction");
+ //Here will be the process to extract the CSV files
+ System.out.println("Extraction done");
+ //Here will be the number of playlist, albums, songs and auidobook extracted
+
+ do {
+ System.out.println("What do you want to do? [h for help]");
+ userInput = scan.nextLine();
+ switch(userInput) {
+ case "h" : //page help
+ System.out.printf("c: add a new song\na: add a new album\n+: add an existing song to an album\nl: add a new audiobook\np: create a new playlist from existing songs and audiobooks\n-: delete a playlist\ns: save playlists, albums, songs and audiobooks into the concerned files\nh: print this help screen\nq: quit the program\n");
+ break;
+ case "q" :
+ System.out.println("Goodbye !");
+ break;
+ default :
+ System.out.println("Unknown command. Type h for help.");
+
+ }
+ } while(!userInput.equals("q"));
+ }
+}