Advertisement
vp0415

lec2.4.2

Oct 12th, 2014
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. public class EmployeeTest {
  2.  
  3. public static void main(String[] args) {
  4. Employee employee1 = new Employee("Dick" , "Grayson" , 999.95);
  5.  
  6. System.out.println("Employee ID");
  7. System.out.printf( "First name: %s\n", employee1.getFirstName());
  8. System.out.printf("Last name: %s\n", employee1.getLastName());
  9. System.out.printf("Monthly salary: %.2f\n", employee1.getMonthlySalary());
  10. System.out.printf("Monthly salary after promotion: %.2f\n", employee1.getLaterSalary());
  11. System.out.println();
  12.  
  13. Employee employee2 = new Employee("Tim" , "Drake" , 888.85);
  14.  
  15. System.out.println("Employee ID");
  16. System.out.printf( "First name: %s\n", employee2.getFirstName());
  17. System.out.printf("Last name: %s\n", employee2.getLastName());
  18. System.out.printf("Monthly salary: %.2f\n", employee2.getMonthlySalary());
  19. System.out.printf("Monthly salary after promotion: %.2f\n", employee2.getLaterSalary());
  20.  
  21. }
  22.  
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement