Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #13650

Re: Wages not calculating correctly

From Gene Wirchenko <genew@ocis.net>
Newsgroups comp.lang.java.programmer
Subject Re: Wages not calculating correctly
Date 2012-04-18 15:04 -0700
Organization A noiseless patient Spider
Message-ID <neeuo7tmjjckv1bsb5l0ts4ubffaimm807@4ax.com> (permalink)
References <e6a1121e-0b79-4b6e-8a5a-62527e3c34d3@m18g2000vbl.googlegroups.com>

Show all headers | View raw


On Wed, 18 Apr 2012 13:53:39 -0700 (PDT), Simfonika Island
<simfonika@gmail.com> wrote:

>My program is not calculating the wages correctly. Can somebody please
>tell me why???

     Yes, but you need to figure it out.  I have given a big clue.

[snip]

>double overtime = 1.5;
        ^^^^^^^^
    Bad name.  It is an overtime *rate*.

[snip]

>wages = max_hours * payRate;
         ^^^^^^^^^
     Why are using this variable here?

[snip]

     If you are not indenting your code, you should.

Sincerely,

Gene Wirchenko

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Wages not calculating correctly Simfonika Island <simfonika@gmail.com> - 2012-04-18 13:53 -0700
  Re: Wages not calculating correctly Gene Wirchenko <genew@ocis.net> - 2012-04-18 15:04 -0700
  Re: Wages not calculating correctly Roedy Green <see_website@mindprod.com.invalid> - 2012-04-18 22:17 -0700
    Re: Wages not calculating correctly Leif Roar Moldskred <leifm@dimnakorr.com> - 2012-04-19 00:58 -0500
      Re: Wages not calculating correctly Roedy Green <see_website@mindprod.com.invalid> - 2012-04-19 01:43 -0700
        Re: Wages not calculating correctly Gene Wirchenko <genew@ocis.net> - 2012-04-19 08:35 -0700
  Re: Wages not calculating correctly Lew <noone@lewscanon.com> - 2012-04-18 23:35 -0700

csiph-web