hello everyone. i am a "newb" to java and am stuck on this program for class all my code is right (as far as i can tell that is) but i seem to be getting two errors and cant figuere out why heres my code and error report.
ERROR
D:\PayCalculator.java:19: cannot find symbol
symbol : class PayCheck
location: class PayCalculator
PayCheck aPayCheck = new PayCheck(hourlyWage, hours);
^
D:\PayCalculator.java:19: cannot find symbol
symbol : class PayCheck
location: class PayCalculator
PayCheck aPayCheck = new PayCheck(hourlyWage, hours);
^
2 errors
Tool completed with exit code 1
code set 1:
import java.util.Scanner; /** This program calculates the pay of an employee. */ public class PayCalculator { public static void main(String[] args) { Scanner in = new Scanner(System.in); System.out.println("Hourly wage: "); double hourlyWage = in.nextDouble(); System.out.println("Hours worked: "); double hours = in.nextDouble(); PayCheck aPayCheck = new PayCheck(hourlyWage, hours); System.out.println("Pay: "+ aPayCheck.getPay()); } }
code set 2:
any and all help is greatly appriciated public class PayCheckpublic class PayCheck { public PayCheck(int PayCheck,double hours) { this.PayCheck=PayCheck; this.hours = hours; } public int getPay() { if(hours>40) PayCheck=hourlyWage*150; if(hours<=40) PayCheck=hourlyWage; return PayCheck; } private int hourlyWage; public int PayCheck; private double hours; }