Document
Document
EDINAH GETANGE
// year to be checked
If (year % 4 == 0) {
If (year % 100 == 0) {
If (year % 400 == 0)
Leap = true;
Else
Leap = false;
Else
Leap = true;
}
Else
Leap = false;
If (leap)
Else
Java programming
Encapsulation allows access to a level without revealing the complex details below that level.
(b)
Employee.java
//setters
This.employeeId=employeeId;
This.employeeName=employeeName;
}
This.salary=salary;
This.netSalary=netSalary;
//getters
Return employeeId;
Return employeeName;
}
Return salary;
Return netSalary;
Pfamount=salary*pfpercentage;
netSalary=salary-pfamount;
}
Public void main(String[] args){
Emp.setEmployeeId(sc.nextInt());
Emp.setEmployeeName(sc.next()) ;
Emp.setSalary(sc.nextDouble());
System.out.println(“Enter PF percentage:”);
Emp.calculateNetSalary(pfpercentage);
System.out.println(“Salay is “ + emp.getNetSalary());
}
(C)
Import java.util.Scanner;
Int x, y, z;
X = s.nextInt();
Y = s.nextInt();
Z = s.nextInt();
If(x > y && x > z)
Else
}
}