Question
Demonstrate the Interface concept for the below problem. I just need f - k a Defined an Interface called FinalGrade, which declares a method called
Demonstrate the Interface concept for the below problem.
I just need f - k
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 && <=100 A
b. Web Technology: =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.
k Design an appropriate UI to enter inputs such as Student id, name, grades in exam, Assignment, in_class, and Quiz.
Optional: if you display the output in UI, you will get additional 10 points
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started