Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

a Defined an Interface called FinalGrade, which declares a method called computeFinalGrades(). b Define another interface called LetterGrade, which declares a method called computeLetterGrade(). c

a Defined an Interface called FinalGrade, which declares a method called computeFinalGrades(). b Define another interface called LetterGrade, which declares a method called computeLetterGrade(). c Define a super class named Course with subject code, avg_exams, avg_Assignments as data members. d Define two subclasses as below: 1) Advanced Java with an additional field called grades_in_class 2) Web Technology with an additional field called grades_Quizzes. Define the required constructors and getter methods in both classes. e Override the computeGrade() in both classes as below: 1. In Advanced Java, Fgrade= 40%* avg_exams+ 40%* avg_Assignments + 20* grades_in_class 2. In Web Technology, Fgrade= 30%* avg_exams+ 50%* avg_Assignments + 20*grades_Quizzes Note: Fgrade is a local variable in the computeGrade() method. f Override the computeLetterGrade() as below a. Advanced Java: =60 && =70 && =80 && =90 && =60 && =75 && =85 && =95 && <=100 A g Define a class named Student with PSID, and name as instance variables. h Define a class named StudentOneSub that extends the Student class with an object of Advanced Java as an additional instance variable. Define a method displayOS() to display Final grade , and Letter Grade. i Define a class named StudentTwoSub that extends the Student class with an object of Advanced Java and an object of Web Technology as additional instance variables. Define a method displayTS() to display Final grade , and Letter Grade in both subjects. j Define a DemoGrades class with a main () method, create objects for both the StudentOneSub, and StudentTwoSub to display final grades and letter grades for the corresponding objects.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions