Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started