Yes Jchang504, this has already been solved. The issue was that he renamed the getPay method.
I am not sure why you cannot compile programs from a Flash drive. I have never tried before.
Type: Posts; User: JavaPF
Yes Jchang504, this has already been solved. The issue was that he renamed the getPay method.
I am not sure why you cannot compile programs from a Flash drive. I have never tried before.
Cool. Don't worry, you'll pick up Java in no time!
We are always here to help :D
Thank you for the calculations EmeraldStones. They look correct to me.
big_c, here is the fixed code:
public class PayCheck {
public PayCheck(double hourlyWage, double hours) {
...
There are a few reasons why this code did not fuction properly.
The PayCheck value was always being passed as 0. Once that is corrected the variables need to be changed from int to double.
Can...
I knew this question was coming ;)
Can you please post the PayCalculator & PayCheck classes that you are now using and I will help you fix it.
No problem :)
Glad I could help. Has this solved all your issues now?
OK I can see your error!
In PayCalculator you call aPayCheck.getPay()
System.out.println("Pay: "+ aPayCheck.getPay());
But getPay() doesn't exist in the PayCheck class.
I can't see anything wrong with the code. In Eclipse it is all compiling fine.
Could you attach a screen shot of your IDE including the error? This might help me to see what is going on.
Are the PayCalculator & PayCheck classes both in your My Documents directory?
This error is generated because it looks like the PayCheck class cannot be located.
Yes you should check to make sure the PayCheck class is in the same directory as this could also be causing the problem.
Sorry EmeraldStones, I think you are wrong. If you look at the...
Please make sure you change:
PayCheck aPayCheck = new PayCheck(hourlyWage, hours);
to
Even with my code you are still getting the same error?
That is strange because it is compiling fine for me...
Hello big_c and welcome to the Java Programming Forums :D
You are getting the error because of this:
PayCheck aPayCheck = new PayCheck(hourlyWage, hours);
hourlyWage is a double value and...