You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
841 B

6 years ago
  1. // The Song class that represents a song
  2. // Do not make any changes to this file!
  3. // Xiwei Wang
  4. public class Song
  5. {
  6. // instance variables
  7. private String m_artist;
  8. private String m_title;
  9. private Song m_link;
  10. // constructor
  11. public Song(String artist, String title)
  12. {
  13. m_artist = artist;
  14. m_title = title;
  15. m_link = null;
  16. }
  17. // getters and setters
  18. public void setArtist(String artist)
  19. {
  20. m_artist = artist;
  21. }
  22. public String getArtist()
  23. {
  24. return m_artist;
  25. }
  26. public void setTitle(String title)
  27. {
  28. m_title = title;
  29. }
  30. public String getTitle()
  31. {
  32. return m_title;
  33. }
  34. public void setLink(Song link)
  35. {
  36. m_link = link;
  37. }
  38. public Song getLink()
  39. {
  40. return m_link;
  41. }
  42. }