public class Song extends MusicalElement
MusicalElement
,
Serialized FormConstructor and Description |
---|
Song(java.lang.String title,
int duration,
java.lang.String content,
java.lang.String artist,
Genre genre)
Constructor method.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getArtist()
This method is used to give the artist of the song.
|
java.lang.String |
getGenre()
This method is used to give the genre of the song.
|
void |
setArtist(java.lang.String artist)
Basic method to set the artist of the song.
|
void |
setGenre(Genre genre)
Basic method to set the genre of the song using the name method from the Genre class.
|
java.lang.String |
toString()
Basic method to "configure" what does a print of this object actually does.
|
getContent, getDuration, getId, getTitle, setContent, setDuration, setId, setTitle
public java.lang.String getArtist()
public java.lang.String getGenre()
Genre
public void setArtist(java.lang.String artist)
artist
- Stringpublic void setGenre(Genre genre)
genre
- GenreGenre
public java.lang.String toString()
toString
in class java.lang.Object