aboutsummaryrefslogtreecommitdiffstats
path: root/Song.java
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Song.java13
1 files changed, 9 insertions, 4 deletions
diff --git a/Song.java b/Song.java
index ecbb1eb..2890536 100644
--- a/Song.java
+++ b/Song.java
@@ -1,5 +1,8 @@
public class Song extends MusicalElement{
+
+ private static final long serialVersionUID = 2112880640160601826L;
private String artist, genre;
+
public Song(String title, int duration, String content, String artist, Genre genre) {
super(title, duration, content);
this.artist=artist;
@@ -12,14 +15,16 @@ public class Song extends MusicalElement{
public void setGenre(Genre genre){this.genre=genre.name();}
public String toString() {
- return getTitle()+";"+getDuration()+";"+getContent()+";"+artist+";"+genre;
+ return "Title : "+getTitle()+"\nDuration : "+getDuration()+"\nContent : "+getContent()+"\nArtist : "+getArtist()+"\nGenre : "+getGenre();
+// return getTitle()+";"+getDuration()+";"+getContent()+";"+getArtist()+";"+getGenre();
}
- public void save(){
+/* public static void save(){
+ String filename="songs.csv";
try
{
//Saving of object in a file
- FileOutputStream file = new FileOutputStream(songs.csv);
+ FileOutputStream file = new FileOutputStream(filename);
ObjectOutputStream out = new ObjectOutputStream(file);
// Method for serialization of object
@@ -36,7 +41,7 @@ public class Song extends MusicalElement{
{
System.out.println("IOException is caught");
}
- }
+ }*/
}
:02:47 +0200'>2021-05-19Update README.mdClyhtsuriva1-1/+2 2021-05-19Update README.mdClyhtsuriva1-8/+7 2021-05-19Update README.mdrelease/3.2.1Clyhtsuriva1-6/+21 2021-05-19Big updaterelease/3.2Clyhtsuriva55-235/+193 2021-05-19Update README.mdClyhtsuriva1-1/+5 2021-05-14Update README.mdClyhtsuriva1-1/+3 2021-05-14Update README.mdClyhtsuriva1-0/+23 2021-05-14Update README.md and adding logo onto the main screenrelease/3.1Clyhtsuriva2-10/+13 2021-05-14Singletons on all pages : OKClyhtsuriva6-125/+81 2021-05-14Singletons : DetailTopManga : OKClyhtsuriva2-21/+49 2021-05-14Addedd Singletons for TopManga.Clyhtsuriva3-23/+43