DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   Java (http://www.daniweb.com/forums/forum9.html)
-   -   Java program cd player need some help please (http://www.daniweb.com/forums/thread153273.html)

stultuske Oct 24th, 2008 11:49 am
Re: Java program cd player need some help please
 
if it doesn't compile, it gives you an exception message. look at why it isn't compiling, in a lot of cases it states specificly what the problem is and on which line of which class it can be found.

if you can't find it, post the error message here

king000000 Oct 24th, 2008 11:58 am
Re: Java program cd player need some help please
 
1 Attachment(s)
Hi I have uploaded my current version as i am really stuck please take a look any help would be really nice it has been done in bluej

thanks

stultuske Oct 24th, 2008 12:04 pm
Re: Java program cd player need some help please
 
Quote:

Originally Posted by king000000 (Post 720630)
public void setTrack(int trackNumber){ this.track = trackNumber; // although I must say this.trackNumber = trackNumber sounds more logical, but then // it would be setTrackNumber(int trackNumber)}

this gives me incompatable types found int but expected Track

that's because you didn't follow naming conventions.

if you say: setTrack, that means you want to set the variable with the name 'track'
obviously, either your name for your method is wrongly chosen, or the argument you're passing is wrong

king000000 Oct 24th, 2008 12:10 pm
Re: Java program cd player need some help please
 
ok this zip i uploaded is a school working i am ment to get player.class with all 5 methods working obviously its not straight foward, is there any charce in your looking through what i have done and if you can at least get the thing compiling id be really happy

stultuske Oct 24th, 2008 12:15 pm
Re: Java program cd player need some help please
 
maybe I'll look at it tonight, but if it is just getting getters and setters to work, it's best for you to get it working on your own.
unless you manage to work with them in a proper way, you'll be failing the hell out of your class

king000000 Oct 24th, 2008 12:40 pm
Re: Java program cd player need some help please
 
yeah guess so, but if you can havea look at it tonight that would be great

darkagn Oct 25th, 2008 1:38 am
Re: Java program cd player need some help please
 
If you tell us what the compiler errors are we will try to give you hints as to how to fix it yourself. That way you will learn more than if we just go ahead and fix it for you (which would be cheating btw). In the end you would only be cheating yourself...


All times are GMT -4. The time now is 6:45 pm.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC