View Single Post
Join Date: Jan 2007
Posts: 706
Reputation: stultuske is a jewel in the rough stultuske is a jewel in the rough stultuske is a jewel in the rough 
Solved Threads: 84
stultuske's Avatar
stultuske stultuske is offline Offline
Master Poster

Re: Java program cd player need some help please

 
0
  #8
Oct 24th, 2008
Originally Posted by king000000 View Post
ok thanks for that but i still cant compile the program and would really like to test it can you quicky add the code needed for these methods please:
you do relise that these getters and setters are the very basic of OO programming, do you?
it's no use trying to write a MediaPlayer, no matter how simple, if you haven't got the hang of those yet. anyway, here you are, and I'm just guessing you've been respecting the naming conventions

  1. public void setTrack(int trackNumber)
  2. {
  3. this.track = trackNumber;
  4. // although I must say this.trackNumber = trackNumber sounds more logical, but then
  5. // it would be setTrackNumber(int trackNumber)
  6. }
  7.  
  8. public String getTrackName()
  9. {
  10. return this.trackName;
  11. }
  12.  
  13. public String getTrackInfo()
  14. {
  15. return this.trackInfo;
  16. }
Reply With Quote