Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class EmployeeTest {
- public static void main(String[] args) {
- Employee employee1 = new Employee("Dick" , "Grayson" , 999.95);
- System.out.println("Employee ID");
- System.out.printf( "First name: %s\n", employee1.getFirstName());
- System.out.printf("Last name: %s\n", employee1.getLastName());
- System.out.printf("Monthly salary: %.2f\n", employee1.getMonthlySalary());
- System.out.printf("Monthly salary after promotion: %.2f\n", employee1.getLaterSalary());
- System.out.println();
- Employee employee2 = new Employee("Tim" , "Drake" , 888.85);
- System.out.println("Employee ID");
- System.out.printf( "First name: %s\n", employee2.getFirstName());
- System.out.printf("Last name: %s\n", employee2.getLastName());
- System.out.printf("Monthly salary: %.2f\n", employee2.getMonthlySalary());
- System.out.printf("Monthly salary after promotion: %.2f\n", employee2.getLaterSalary());
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement