Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Java Programming JAVA OOP POLYMORPHISM Given Teacher is the superclass, YoungTeacher and SeniorTeacher are the subclasses. Superclass Attributes Methods Subclass Attributes : Teacher :int TeachID;

Java Programming image text in transcribed

JAVA OOP POLYMORPHISM Given Teacher is the superclass, YoungTeacher and SeniorTeacher are the subclasses. Superclass Attributes Methods Subclass Attributes : Teacher :int TeachID; //teacher ID String teachName; //teacher name String facName; //faculty name : constructor, mutator, accessor, printer public abstract double calculate Bonus(); YoungTeacher : String mentorName; //mentor's name boolean XKICStud; //true - if the teacher is ex-KIC student int years; llyear of service : constructor, mutator, accessor, printer, abstract method :SeniorTeacher : String dateJoin; //date joining KIC String grade; //JF25, JF32, JF33, JF34 constructor, mutator, accessor, printer, abstract method Methods Subclass Attributes Methods Every year, each teacher will receive a bonus, but at a different rate depending on their status as a young or senior teacher. The bonus for each teacher type is determined using the following table: Teacher type Total bonus (SGD) Year of service 5 years 1600 1900 2100 Young teacher Teacher type Grade JF32 JF33 JF34 Total bonus (SGD) 2300 2400 2600 Senior teacher a) Write a complete class for Teacher, YoungTeacher and SeniorTeacher. b) Write a function named calculateBonus() to calculate and return the bonus paid to each teacher for both subclasses. c) Complete the main application to do the following tasks: i. ii. iii. Count and display the number of young teachers who are ex-KIC students. Calculate and display the total bonus that KIC should pay to all teachers. Display the information of senior teacher whose grade is JF34

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

DB2 11 The Database For Big Data And Analytics

Authors: Cristian Molaro, Surekha Parekh, Terry Purcell, Julian Stuhler

1st Edition

1583473858, 978-1583473856

More Books

Students also viewed these Databases questions

Question

How is sensitivity analysis used in project selection?

Answered: 1 week ago

Question

=+ 2. What is fi at money? What is commodity money?

Answered: 1 week ago

Question

1. What is meant by Latitudes? 2. What is cartography ?

Answered: 1 week ago

Question

What is order of reaction? Explain with example?

Answered: 1 week ago