Hi Guys,
I have a main class, an employee class and a fullTime class which is a subclass of employee. I am trying to output some hard written data in the main class but I get the following characters when I run it:
Here is my code:
Employee Class:
public abstract class Employee {
protected int workid ;
protected String name ;
protected int tel ;
protected static int lastid = 100000 ;
protected double pay ;
public Employee() {
name = "" ;
tel = 0;
workid = lastid++ ;
pay = 0.0 ;
}
public Employee (String nm, int ext) {
name = nm ;
tel = ext ;
workid = lastid++ ;
pay = 0.0 ;
}
public abstract void calculatePayment(); // abstract method
}
FullTime Class:
public class FT extends Employee {
protected static double salary = 1600.0;
public FT () {
super();
}
public FT (String nm, int ext){
super(nm, ext);
}
}
Main Class:
public class main {
public static void main( String[] args )
{
FT e1 = new FT ( "John", 1237 ) ;
FT e2 = new FT ( "Michelle", 1291 ) ;
System.out.println( "test: " + e1 ) ; // Output data
}
}