i have written the first question, please follow the way of my first question  /*  Employee class  */ public class Employee {     public int EmployeeID;     public String EmployeeName;     public double salary;     public Employee() {     }     public Employee(int EmployeeID, String EmployeeName, double salary) {         this.EmployeeID = EmployeeID;         this.EmployeeName = EmployeeName;         this.salary = salary;     }          public void display(){         System.out.println("The Employee ID is "+EmployeeID);         System.out.println("The Employee Name is "+EmployeeName);         System.out.println("The Employee salary is "+salary);     }     public double computerSal(double bonus){         double totalSal = salary + bonus;         return totalSal;     }     public int getEmployeeID() {         return EmployeeID;     }     public void setEmployeeID(int EmployeeID) {         this.EmployeeID = EmployeeID;     }     public String getEmployeeName() {         return EmployeeName;     }     public void setEmployeeName(String EmployeeName) {         this.EmployeeName = EmployeeName;     }     public double getSalary() {         return salary;     }     public void setSalary(double salary) {         this.salary = salary;     }                }

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
100%

i have written the first question, please follow the way of my first question 

/*
 Employee class
 */
public class Employee {
    public int EmployeeID;
    public String EmployeeName;
    public double salary;

    public Employee() {
    }

    public Employee(int EmployeeID, String EmployeeName, double salary) {
        this.EmployeeID = EmployeeID;
        this.EmployeeName = EmployeeName;
        this.salary = salary;
    }
    
    public void display(){
        System.out.println("The Employee ID is "+EmployeeID);
        System.out.println("The Employee Name is "+EmployeeName);
        System.out.println("The Employee salary is "+salary);
    }
    public double computerSal(double bonus){
        double totalSal = salary + bonus;
        return totalSal;
    }

    public int getEmployeeID() {
        return EmployeeID;
    }

    public void setEmployeeID(int EmployeeID) {
        this.EmployeeID = EmployeeID;
    }

    public String getEmployeeName() {
        return EmployeeName;
    }

    public void setEmployeeName(String EmployeeName) {
        this.EmployeeName = EmployeeName;
    }

    public double getSalary() {
        return salary;
    }

    public void setSalary(double salary) {
        this.salary = salary;
    }
    
    
    
}

3. Create a class Teaching and do the following:
a) The class should inherit the Employee Class.
b) Declare a member variable Teaching hours and Advising hours
c) Create a default constructor with no parameter
d) Create a parameterized constructor that will call the constructor of the parent class
(super class) and then initialize the member variables.
e) Create a method that will return a value to determine the status of the Employee based
on the criteria below:
When Teaching hours is greater than or equal to 18 AND Advising hours is greater
than or equal to 2 then the status of the Employee is "Full Load".
Otherwise the status of the Employee is "Not Full Load"
The method should return the status of the Employee.
h) Create an overriding method to compute and return the Total Salary. The method will
accept parameter Rate of type double. The method will compute and return the value of
Total Salary using the formula:
Total Salary Rate * Teaching Hours
f) Create an overriding method to display all the member variables. The method should
invoke/call the super class display method and then display also all the member
variables of this class.
g) Generate the getters and setters
4. Create a controlling class and do the following:
• Create an object for the two (2) subclasses
Read the input, call the necessary methods, and display the required output.
Transcribed Image Text:3. Create a class Teaching and do the following: a) The class should inherit the Employee Class. b) Declare a member variable Teaching hours and Advising hours c) Create a default constructor with no parameter d) Create a parameterized constructor that will call the constructor of the parent class (super class) and then initialize the member variables. e) Create a method that will return a value to determine the status of the Employee based on the criteria below: When Teaching hours is greater than or equal to 18 AND Advising hours is greater than or equal to 2 then the status of the Employee is "Full Load". Otherwise the status of the Employee is "Not Full Load" The method should return the status of the Employee. h) Create an overriding method to compute and return the Total Salary. The method will accept parameter Rate of type double. The method will compute and return the value of Total Salary using the formula: Total Salary Rate * Teaching Hours f) Create an overriding method to display all the member variables. The method should invoke/call the super class display method and then display also all the member variables of this class. g) Generate the getters and setters 4. Create a controlling class and do the following: • Create an object for the two (2) subclasses Read the input, call the necessary methods, and display the required output.
1. Create an Employee class and do the following:
a) Declare the following member variables: Employee Id, Employee Name, and Salary
b) Create a default constructor with no parameter.
c) Create a parameterized constructor to initialize all the member variables.
d) Create a method to display all the member variables.
e) Create a method that will compute the Total Salary of the Employee and return it. The
method will accept one parameter Bonus of type double.
The Total Salary is computed as Salary + Bonus.
f)
Generate the getters and setters.
2. Create a class Admin and do the following:
a) The class should inherit the Employee Class.
b) Declare a member variable Allowance and Department
c) Create a default constructor with no parameter
d) Create a parameterized constructor that will call the constructor of the parent class
(super class) and then initialize the member variables.
e) Create an overriding method to compute the Total Salary. The method will compute and
return the value of Total Salary using the formula below:
Total Salary = Salary + Allowance
f) Create an overriding method to display all the member variables. The method should
invoke/call the super class display method and then display also all the member
variables of this class.
g) Generate the getters and setters
Transcribed Image Text:1. Create an Employee class and do the following: a) Declare the following member variables: Employee Id, Employee Name, and Salary b) Create a default constructor with no parameter. c) Create a parameterized constructor to initialize all the member variables. d) Create a method to display all the member variables. e) Create a method that will compute the Total Salary of the Employee and return it. The method will accept one parameter Bonus of type double. The Total Salary is computed as Salary + Bonus. f) Generate the getters and setters. 2. Create a class Admin and do the following: a) The class should inherit the Employee Class. b) Declare a member variable Allowance and Department c) Create a default constructor with no parameter d) Create a parameterized constructor that will call the constructor of the parent class (super class) and then initialize the member variables. e) Create an overriding method to compute the Total Salary. The method will compute and return the value of Total Salary using the formula below: Total Salary = Salary + Allowance f) Create an overriding method to display all the member variables. The method should invoke/call the super class display method and then display also all the member variables of this class. g) Generate the getters and setters
Expert Solution
steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY