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 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: References: 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 On Wed, 18 Apr 2012 13:53:39 -0700 (PDT), Simfonika Island 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