Professional Documents
Culture Documents
NAME: Param Shah ID: Vu4f2021119 Div: A: Expirnment No: 11 Aim
NAME: Param Shah ID: Vu4f2021119 Div: A: Expirnment No: 11 Aim
ID: Vu4f2021119
DIV: A
EXPIRNMENT NO : 11
Code:
class Exp11 {
}
}
class Employee {
public int emp_no;
public String emp_name;
public int emp_saL;
public double new_saL;
public double inc;
}
public void enhancsal(){
System.out.println("Previous salary of the Employee "+ emp_name +" is " + emp_saL);
inc =( emp_saL/5);
new_saL= inc + emp_saL;
System.out.println("Enchanced salary of the Employee " + emp_name +" is " + new_saL);
}
class HOD{
public int hod_no;
public String hod_name;
public int hod_saL;
public String hod_dep;
public void setHODdetails(int no, String name , int sal , String dep){
hod_no=no;
hod_name= name;
hod_saL=sal;
hod_dep = dep;
System.out.println("||||||||||||||||||||H.O.D||||||||||||||||||||");
System.out.println("ID number of the Current H.O.D is " + hod_no);
System.out.println("Name of the Current H.O.D is " + hod_name);
System.out.println("Salary of the Current H.O.D is " + hod_saL);
System.out.println("Department of the Current H.O.D is " + hod_dep);
}
public void changeHOD(int no, String name , int sal , String dep){
hod_no=no;
hod_name= name;
hod_saL=sal;
hod_dep=dep;
}
OUTPUT: