|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.ObjectSong
public class Song
An instance of the Song class represents a song
with a title sung by an artist of some musical genre.
| Constructor Summary | |
|---|---|
Song(java.lang.String songTitle,
java.lang.String songArtist,
java.lang.String songGenre)
Creates a Song instance with the specified
title, artist, and genre. |
|
| Method Summary | |
|---|---|
java.lang.String |
getArtist()
Returns the artist of this song. |
java.lang.String |
getGenre()
Returns the genre of this song. |
java.lang.String |
getTitle()
Returns the title of this song. |
java.lang.String |
toString()
Returns a String representation of this song. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Song(java.lang.String songTitle,
java.lang.String songArtist,
java.lang.String songGenre)
Song instance with the specified
title, artist, and genre.
songTitle - a String representing the title of the songsongArtist - a String representing the song's performing artistsongGenre - a String representing the musical genre of the song| Method Detail |
|---|
public java.lang.String getTitle()
this song.
String corresponding to the song's titlepublic java.lang.String getArtist()
this song.
String corresponding to the song's performing artistpublic java.lang.String getGenre()
this song.
String corresponding to the song's musical genrepublic java.lang.String toString()
String representation of this song.
The title, artist, and genre are separated by tabs in a in a one-line String.
toString in class java.lang.ObjectString
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||