Question: Just answer the question. Do not give full codes. Java Object Oriented Programming Polymorphism with abstract Given the class diagram: Superclass Staff Attributes: -ID -name



Java Object Oriented Programming Polymorphism with abstract Given the class diagram: Superclass Staff Attributes: -ID -name Methods: +Normal constructor +setter, +getter, +toString +abstract method Subclass General Worker Attributes: -Socso //true or false Methods: +Normal constructor +setter, +getter, +toString +abstract method definition Subclass ProfesionalWorker Attributes: -professionalTitle //Ir, Dr, Ts -professionalLevel l/international, local Methods: +Normal constructor +setter, +getter, +toString +abstract method definition 1. a.Below, the processor definition method in subclass file named GeneralWorker.java. Write an abstract method header for its definition in superclass file named Staff.java public double calBonus () { double bonus = salary * (1-0.05); return bonus; } (1 mark) b.Given the code snippet below. Rewrite the correct one. W/ List of staff have Socso (insurance) for (int i = 0; i
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
