Guest User

Untitled

a guest
Jun 24th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. package pkgday3;
  2.  
  3. class Employee
  4. {
  5. public void Name(String Name)
  6. {
  7.  
  8. System.out.println("name of Employee :" +Name);
  9. }
  10. public void Salary(int Salary)
  11. {
  12.  
  13. System.out.println("Salary of Employee:" +Salary);
  14. }
  15. }
  16. class Manager extends Employee
  17. {
  18. public void Department(String Department)
  19. {
  20.  
  21. System.out.println("Department of Employee:" +Department);
  22.  
  23. //Employee e=new Employee();
  24.  
  25. }
  26. }
  27. class Executive extends Manager
  28. {
  29.  
  30. public void Exe(String Exe)
  31. {
  32. System.out.println("Executive");
  33. }
  34.  
  35.  
  36. public static class Ques
  37. {
  38. public static void main(String[] args)
  39. {
  40. Employee e=new Employee();
  41. e.Name("abc");
  42. e.Salary(50000);
  43. Manager s1= new Manager();
  44. s1.Department("Xyz Department");
  45. Executive i1= new Executive();
  46. i1.Exe(null);
  47. }
  48. }
  49. }
Add Comment
Please, Sign In to add comment