From 8f19fb3b2578db523fa574427aacd51ae873cbc2 Mon Sep 17 00:00:00 2001 From: Masfehico Date: Mon, 7 Dec 2020 14:55:09 +0100 Subject: Updating song and audiobook accordingly to the last commit --- AudioBook.java | 10 +++++----- Song.java | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/AudioBook.java b/AudioBook.java index c1722dd..6502a32 100644 --- a/AudioBook.java +++ b/AudioBook.java @@ -1,10 +1,10 @@ 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) { + public AudioBook(int id, String title, int duration, String content, String author, Language language, Category category) { super(id, title, duration, content); this.author=author; - this.language=language; - this.category=category; + this.language=language.name(); + this.category=category.name(); } @@ -12,7 +12,7 @@ public class AudioBook extends MusicalElement { public String getLanguage(){return language;} public String getCategory(){return category;} public void setArtist(String author){this.author=author;} - public void setGenre(String language){this.language=language;} - public void setCategory(String category){this.category=language;} + public void setGenre(Language language){this.language=language.name();} + public void setCategory(Category category){this.category=category.name();} } diff --git a/Song.java b/Song.java index 81392ab..c7556b1 100644 --- a/Song.java +++ b/Song.java @@ -1,13 +1,13 @@ public class Song extends MusicalElement { private String artist, genre; - public Song(int id, String title, int duration, String content, String artist, String genre) { + public Song(int id, String title, int duration, String content, String artist, Genre genre) { super(id, title, duration, content); this.artist=artist; - this.genre=genre; + this.genre=genre.name(); } public String getArtist(){return artist;} public String getGenre(){return genre;} public void setArtist(String artist){this.artist=artist;} - public void setGenre(String genre){this.genre=genre;} + public void setGenre(Genre genre){this.genre=genre.name();} } -- cgit v1.2.3