I keep getting the error: employee.java:78: cannot resolve symbol
symbol : class Employee
location: class employee
import java.applet.Applet;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Rectangle;
import javax.swing.JOptionPane;
public class employee extends Applet
{
public void init()
// protected String newName;
// protected float totalPay;
{
//First Employee
String name1;
name1 = JOptionPane.showInputDialog("Enter the hourly workers name:"
employee1 = new Employee(name1);
String input2;
input2 = JOptionPane.showInputDialog("Enter the number of hours worked:"
float hours1 = Float.parseFloat(input2);
employee1.getHours(hours1);
String input3;
input3 = JOptionPane.showInputDialog("Enter the payrate:"
float rate1 = Float.parseFloat(input3);
employee1.getPayRate(rate1);
//Second Student
String name2;
name2 = JOptionPane.showInputDialog("Enter the salary workers name:"
employee2 = new Employee(name2);
String input5;
input5 = JOptionPane.showInputDialog("Enter the number of hours worked:"
float hours2 = Float.parseFloat(input5);
employee2.getHours(hours2);
String input6;
input6 = JOptionPane.showInputDialog("Enter the payrate:"
float rate2 = Float.parseFloat(input6);
employee2.setAnnualPay(rate2);
}
public void paint(Graphics g)
{
Graphics2D g2 = (Graphics2D)g;
//Center Text
int center = getWidth()/3;
g2.drawString("Employee Applet ", center, 20);
g2.drawString(" Name Gross Pay ", center, 20);
//First student
g2.drawString("Hourly Employee: "+ employee1.getName()+employee1.computePay() , center, 50);
//Second student
g2.drawString("Salaried Employee"+ employee2.getName()+employee2.calcTotalPay(), center,100);
}
private Employee employee1;
private Employee employee2;
}
Thanks for any help!!
symbol : class Employee
location: class employee
import java.applet.Applet;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Rectangle;
import javax.swing.JOptionPane;
public class employee extends Applet
{
public void init()
// protected String newName;
// protected float totalPay;
{
//First Employee
String name1;
name1 = JOptionPane.showInputDialog("Enter the hourly workers name:"
employee1 = new Employee(name1);
String input2;
input2 = JOptionPane.showInputDialog("Enter the number of hours worked:"
float hours1 = Float.parseFloat(input2);
employee1.getHours(hours1);
String input3;
input3 = JOptionPane.showInputDialog("Enter the payrate:"
float rate1 = Float.parseFloat(input3);
employee1.getPayRate(rate1);
//Second Student
String name2;
name2 = JOptionPane.showInputDialog("Enter the salary workers name:"
employee2 = new Employee(name2);
String input5;
input5 = JOptionPane.showInputDialog("Enter the number of hours worked:"
float hours2 = Float.parseFloat(input5);
employee2.getHours(hours2);
String input6;
input6 = JOptionPane.showInputDialog("Enter the payrate:"
float rate2 = Float.parseFloat(input6);
employee2.setAnnualPay(rate2);
}
public void paint(Graphics g)
{
Graphics2D g2 = (Graphics2D)g;
//Center Text
int center = getWidth()/3;
g2.drawString("Employee Applet ", center, 20);
g2.drawString(" Name Gross Pay ", center, 20);
//First student
g2.drawString("Hourly Employee: "+ employee1.getName()+employee1.computePay() , center, 50);
//Second student
g2.drawString("Salaried Employee"+ employee2.getName()+employee2.calcTotalPay(), center,100);
}
private Employee employee1;
private Employee employee2;
}
Thanks for any help!!