Question: Please explain everyline of this code. Thankyou! Source Code Output D'employee.java X Salary.java Emp.java Employees 12 src# (default package) of employee displayO:void 2 l/class 3

Please explain everyline of this code. Thankyou! Source Code Please explain everyline of this code. Thankyou! Source Code Output D'employee.java X

Salary.java Emp.java Employees 12 src# (default package) of employee displayO:void 2 l/class3 class employee { 4 5 //instance variable 6 int salary_deduc, salary,

Output

workingHour; 7 String name, time_in, time_out; 8 9 //default constructor 100 employee(){

D'employee.java X Salary.java Emp.java Employees 12 src# (default package) of employee displayO:void 2 l/class 3 class employee { 4 5 //instance variable 6 int salary_deduc, salary, workingHour; 7 String name, time_in, time_out; 8 9 //default constructor 100 employee(){ 11 12 //argument constructor 13} 140 employee (String name, int workingHour) { this.name=name; 16 this.workingHour-workingHour; 17 18 19 20 //method 210 public void display(){ 22 System.out.println(" Employee Name = "+name+" Total Working Hour = "+workingHour); 23 24 25 d'employee.java Salary.java X Emp.java Employees 12 i src (default package) Salary 2 //Inheritance 3 class Salary extends employee 5 //Getter and setters for getting and setting properties 7 public int getSalaryDeduc() { return salary_deduc; 9} 100 public void setsalaryDeduc (int salary_deduc) { 11 this.salary_deduc = salary_deduc; 13 public int getsalary() { 14 return salary: 16 public void setsalary(int salary) { 17 this.salary = salary: 18 19 200 public String getTimeIn() { 21 return time_in; 22 } 230 public void setTimeIn(String time_in) { this.time_in = time_in; 25} 26@ public String getTimeout() { 27 return time_out; 281 296 public void setTimeout(String time_out) { 30 this.time_out = time_out; 31 } 32 433 public void display () { 34 System.out.println("Time in = "+time_in+" Time out = "+time_out+" Salary deduction = "+salary_deduc+" Salary = "+salary); 35 36 371 J employee.java Salary.java Emp.java X Employees 12 Src (default package) Emp 2 public class Emp{ //main() method start public static void main(String args[]) { 5 //Array String name[]={"abc", "efg", "Imn", "par", "xyz"); 8 1/looping System.out.println("Name of all employee : "); 10 for (int i = 0; i

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!