A Test Class
Mon Dec 14 2020 00:06:10 GMT+0000 (Coordinated Universal Time)
Saved by
@chasrmartin
public class TestEmployee {
public static void main(String[] args){
System.out.println("Starting test.");
// Create two employee objects
// Employee is a type, just like int or String, so we make
// employee objects just the same way.
Employee john = new Employee("John Lennon", "Strawberry Fields", 1, 16.00);
Employee paul = new Employee("Paul McCartney", "Penny Lane", 2, 15.50);
System.out.println(john.getName()+" "+
john.getAddress()+" "+
john.getIdNumber()+" "+
john.getPayRate());
System.out.println(paul.getName()+" "+
paul.getAddress()+" "+
paul.getIdNumber()+" "+
paul.getPayRate());
System.out.println("Done.");
}
}
content_copyCOPY
Comments