Sup Java - Com Work

import com.example.work.employee.Employee;

public double getSalary() { return baseSalary; } sup java com work

public class Main { public static void main(String[] args) { Employee dev = new Employee("Alice", 101, 70000); Manager mgr = new Manager("Bob", 201, 90000, 15000); import com

public Manager(String name, int id, double baseSalary, double bonus) { super(name, id, baseSalary); // use of super to call parent constructor this.bonus = bonus; } public double getSalary() { return baseSalary

import com.example.work.employee.Employee; import com.example.work.employee.Manager; import com.example.work.util.Formatter;

public Employee(String name, int id, double baseSalary) { this.name = name; this.id = id; this.baseSalary = baseSalary; }

Scroll to top icon