Jump to content

alienA2

Members
  • Posts

    74
  • Joined

  • Last visited

About alienA2

  • Birthday 09/18/1983

Previous Fields

  • Languages
    Acrobat Javascript; mySQL (Oracle)

Profile Information

  • Location
    Cape Town
  • Interests
    Music and Technology

alienA2's Achievements

Newbie

Newbie (1/7)

19

Reputation

  1. According to the C++ book I have yes lol
  2. Hi My program is not calculating the wages correctly. Can somebody please tell me why??? /** PayCheck Program* This program computes an employee's wages for the week*/import java.util.Scanner;import static java.lang.System.in;import static java.lang.System.out;class mainPayCheckProg{ public static void main(String args[]) { // create an instance of the class or object payCheckMethods aWage = new payCheckMethods(); Scanner prompt_user = new Scanner(in); double payRate; double hours; double wages; int empNum; double max_hours = 40.0; double overtime = 1.5; out.print("Enter Employee Number: "); empNum = prompt_user.nextInt(); out.print("Enter Pay Rate: "); payRate = prompt_user.nextDouble(); out.print("Enter Hours Worked: "); hours = prompt_user.nextDouble(); if (hours > max_hours) { wages = (max_hours * payRate) + (hours - max_hours) * payRate * overtime; } else { wages = max_hours * payRate; } out.print("Employee Number: "); out.println(empNum); out.print("Pay rate: "); out.println(payRate); out.print("Hours worked: "); out.println(hours); out.print("Wages: "); out.println(wages); }}
  3. I wanna learn !

×
×
  • Create New...