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


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

Re: Wages not calculating correctly

Path csiph.com!usenet.pasdenom.info!gegeweb.org!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail
From Gene Wirchenko <genew@ocis.net>
Newsgroups comp.lang.java.programmer
Subject Re: Wages not calculating correctly
Date Wed, 18 Apr 2012 15:04:53 -0700
Organization A noiseless patient Spider
Lines 27
Message-ID <neeuo7tmjjckv1bsb5l0ts4ubffaimm807@4ax.com> (permalink)
References <e6a1121e-0b79-4b6e-8a5a-62527e3c34d3@m18g2000vbl.googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Transfer-Encoding 7bit
Injection-Info mx04.eternal-september.org; posting-host="wKah3EH8kutwAOV6+9FiEQ"; logging-data="8197"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/t048C1rPutIzTxJLQluCfC7xCfaMXtPg="
X-Newsreader Forte Agent 4.2/32.1118
Cancel-Lock sha1:J8pq0zkCQ6MlrGEP+G3rF1QXhLU=
Xref csiph.com comp.lang.java.programmer:13650

Show key headers only | 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