Search:

Type: Posts; User: JavaPF

Search: Search took 0.09 seconds.

  1. Replies
    31
    Views
    6,219

    [SOLVED] Re: fixing these two errors

    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.
  2. Replies
    31
    Views
    6,219

    [SOLVED] Re: fixing these two errors

    Cool. Don't worry, you'll pick up Java in no time!

    We are always here to help :D
  3. Replies
    31
    Views
    6,219

    [SOLVED] Re: fixing these two errors

    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) {
    ...
  4. Replies
    31
    Views
    6,219

    [SOLVED] Re: fixing these two errors

    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...
  5. Replies
    31
    Views
    6,219

    [SOLVED] Re: fixing these two errors

    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.
  6. Replies
    31
    Views
    6,219

    [SOLVED] Re: fixing these two errors

    No problem :)

    Glad I could help. Has this solved all your issues now?
  7. Replies
    31
    Views
    6,219

    [SOLVED] Re: fixing these two errors

    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.
  8. Replies
    31
    Views
    6,219

    [SOLVED] Re: fixing these two errors

    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.
  9. Replies
    31
    Views
    6,219

    [SOLVED] Re: fixing these two errors

    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.
  10. Replies
    31
    Views
    6,219

    [SOLVED] Re: fixing these two errors

    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...
  11. Replies
    31
    Views
    6,219

    [SOLVED] Re: fixing these two errors

    Please make sure you change:



    PayCheck aPayCheck = new PayCheck(hourlyWage, hours);


    to
  12. Replies
    31
    Views
    6,219

    [SOLVED] Re: fixing these two errors

    Even with my code you are still getting the same error?

    That is strange because it is compiling fine for me...
  13. Replies
    31
    Views
    6,219

    [SOLVED] Re: fixing these two errors

    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...
Results 1 to 13 of 13