Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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
image text in transcribed
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

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

MySQL Crash Course A Hands On Introduction To Database Development

Authors: Rick Silva

1st Edition

1718503008, 978-1718503007

More Books

Students also viewed these Databases questions