Question: Please fix the code provide on github( Week11=>ClassLabInheritance=>Employee.Java) code Correct the errors inside the file make sure program compiles successfully. /* private class Employee {
- Please fix the code provide on github( Week11=>ClassLabInheritance=>Employee.Java)
- code
- Correct the errors inside the file
- make sure program compiles successfully.
| /* | |
| private class Employee { | |
| String salary=100000; | |
| public Employee(char salary){ | |
| th.salary=salary; | |
| } | |
| } | |
| //use inheritance here | |
| class Programmer Employees { | |
| int bonus = 5000; | |
| public Programmer(int Salary){ | |
| //call super class constructor | |
| } | |
| public static void main(String args[]) { | |
| //create object here | |
| System.out.println (\"Programmer salary is:\" + p.salary); | |
| System.out.println (\"Bonus of Programmer is:\" + p.bonus); | |
| } | |
| } | |
| */ |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
