Question: Answer any questions after posting code that runs correct output shown, for thumbs up please. Task 5. Creating inheritance 2 (20 points) - Purpose: Use

 Answer any questions after posting code that runs correct output shown,

for thumbs up please. Task 5. Creating inheritance 2 (20 points) -

Answer any questions after posting code that runs correct output shown, for thumbs up please.

Task 5. Creating inheritance 2 (20 points) - Purpose: Use inheritance to manage the definition of common/individual properties and methods Task: Given class GradedActivity: public class GradedActivity { private double score; // Numeric score public void setScore (double s) { score = S; } public double getScore() { return score; } public char getGrade() { char letterGrade; if (score >= 90) letterGrade = 'A'; else if (score >= 80) letterGrade = 'B', else if (score >= 70) letterGrade = 'C'; else if (score >= 60) letterGrade = 'D'; else letterGrade = 'F'; return letterGrade; } 1. Design a FinalExam class that extends the GradedActivity class. The FinalExam class should determine the grade a student receives for an exam. The student's exam score can be up to 100 and is determined in the following manner: MultipleChoice: 50 points FillinTheBlank: 20 points Coding: 30 points You are not allowed to modify the GradedActivity class, except to make it static if you want to include it in the same.java file as the main program. 2. Demonstrate the class in a simple program that assigns scores for each of the 3 sections and displays the resulting letter grade. One possible main program, although this can be done several other ways: FinalExam f = new FinalExam(); f.setScore(45, 10, 25); System.out.println("The student earned a + f.getGrade()); With the output The student earned a B - Rubric: Student name and today's date is a comment in the first line of the programs: -10 points if fails Screenshot and program code: -10 points if fails FinalExam class matches problem statement (MultipleChoice, FillInTheBlank, Coding): - 20 points if fails GradedActivity included as-is: 7 points FinalExam inheritance and method override(s): 7 points FinalExam data structures as/if needed: 3 points - Main program to demonstrate FinalExam: 3 points Please paste a screenshot of a successful program run, and copy-and-paste the source code from your main program's java file, here

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!