Class Song

java.lang.Object
  extended by Song

public class Song
extends java.lang.Object

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

Song

public Song(java.lang.String songTitle,
            java.lang.String songArtist,
            java.lang.String songGenre)
Creates a Song instance with the specified title, artist, and genre.

Parameters:
songTitle - a String representing the title of the song
songArtist - a String representing the song's performing artist
songGenre - a String representing the musical genre of the song
Method Detail

getTitle

public java.lang.String getTitle()
Returns the title of this song.

Returns:
a String corresponding to the song's title

getArtist

public java.lang.String getArtist()
Returns the artist of this song.

Returns:
a String corresponding to the song's performing artist

getGenre

public java.lang.String getGenre()
Returns the genre of this song.

Returns:
a String corresponding to the song's musical genre

toString

public java.lang.String toString()
Returns a String representation of this song. The title, artist, and genre are separated by tabs in a in a one-line String.

Overrides:
toString in class java.lang.Object
Returns:
a String