Question: java Write a program in java for the following scenario and write a Driver class to test your construction: i) Create an interface called Result

java
java Write a program in java for the following scenario and write

Write a program in java for the following scenario and write a Driver class to test your construction: i) Create an interface called Result which has following members: [1] Member Methods: - Declared an abstract method findGrade() which returns character type value. [1] - Declared an abstract method gradePoint() which returns double type value. [1] ii) Create a subclass Teacher which implements Result has following details: Member Variables: [1.5] -sld-sName-fMarks-midMarks-quizMarks-asmntMarks//StudentidStringtype//StudentnameStringtype//finalexammarksdoubletype//midexammarksdoubletype//Quizmarksdoubletype//Assignmentmarksdoubletype Member Methods: - A parameterized constructor which initializes the instance variables. [1] - A method totalMarks(): Calculates and returns the total marks of a student using following formula: [1] Total marks = fMarks + midMarks + quizMarks + asmntMarks - Define the method findGrade(): To return grade of a student as follows: [2] Define the method gradePoint(): To return grade point of a student as follows: [2] - A method display(): To display name, id, total marks, grade and grade point of the student. [1.5] iii) A driver class to create an object of class Teacher and print all the details. Use following input for your construction: [1] Teacher("26s111","Said", 30,15,15,9)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!