The code below has one error, mind you I am not good at programming, so it is very frustrating sitting in front of the PC for 1.5 hours and can't get anything done.
Here is the error message
'class' or 'interface' expected
public void payday()
It would really help if some one could help me out (this is part of the full code, the full code is attached)
public class Staff
{
private StaffMember[] sMember;
public Staff()
{
sMember=new StaffMember[2];
Hourly t1= new Hourly ("Sam","123 Main Line","555-4569","425-652-124",9.5,0);
sMember[0]=t1;
Employee e =new Employee("Carla","456 Main Line","555-0789","123-456-786",6.5);
sMember[1]=e;
Hourly t2= new Hourly("Rob","998 Main Line","567-7754","542-326-586",8.55,2.0);
sMember[2]=t2;
}
}
public void payday()
{
double amount =0.0;
for (int i=0; i<3;i++)
{
System.out.println(sMember);
amount=sMember.pay();
if(amount==0)
System.out.println("Thanks \n");
else
System.out.println("Paid: "+amount+"\n");
System.out.println("---------------------------------------------------");
}
}
Here is the error message
'class' or 'interface' expected
public void payday()
It would really help if some one could help me out (this is part of the full code, the full code is attached)
public class Staff
{
private StaffMember[] sMember;
public Staff()
{
sMember=new StaffMember[2];
Hourly t1= new Hourly ("Sam","123 Main Line","555-4569","425-652-124",9.5,0);
sMember[0]=t1;
Employee e =new Employee("Carla","456 Main Line","555-0789","123-456-786",6.5);
sMember[1]=e;
Hourly t2= new Hourly("Rob","998 Main Line","567-7754","542-326-586",8.55,2.0);
sMember[2]=t2;
}
}
public void payday()
{
double amount =0.0;
for (int i=0; i<3;i++)
{
System.out.println(sMember);
amount=sMember.pay();
if(amount==0)
System.out.println("Thanks \n");
else
System.out.println("Paid: "+amount+"\n");
System.out.println("---------------------------------------------------");
}
}
