Write a program using the concept of interface to do the following. a) Create an interface Student with a method calculateBonus(double) which calculates Bonus of a Student b) Inherit the interface...


Java


Write a program using the concept of interface to do the following.<br>a) Create an interface Student with a method calculateBonus(double) which calculates Bonus of a Student<br>b) Inherit the interface Student into a subclass Worker Bonus. In WorkerBonus class do the following tasks:<br>) Create a method getStudentDetails() to read id, name and cgpa of an Student.<br>ii) Inside the calculateBonus() method calculate the Bonus using the following conditions.<br>cgpa<br>Bonus<br>>=4<br>10%<br>>=3<br>5%<br>|>=2<br>3%<br><2<br>2%<br>iii) Create a method netcgpa() in the subclass to print the cgpa.<br>Note: cgpa=cgpa+Bonus<br>

Extracted text: Write a program using the concept of interface to do the following. a) Create an interface Student with a method calculateBonus(double) which calculates Bonus of a Student b) Inherit the interface Student into a subclass Worker Bonus. In WorkerBonus class do the following tasks: ) Create a method getStudentDetails() to read id, name and cgpa of an Student. ii) Inside the calculateBonus() method calculate the Bonus using the following conditions. cgpa Bonus >=4 10% >=3 5% |>=2 3% <2 2%="" iii)="" create="" a="" method="" netcgpa()="" in="" the="" subclass="" to="" print="" the="" cgpa.="" note:="" cgpa="">

Jun 10, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here