The following UML diagram indicates the different classes and the inheritance structure used. Using this as a guide develop a program that demonstrates the working of this UML Diagram. 1) The Graded Activity Class The getGrade() - works on the table given below. Score 90 80 70 60 <60 Grade A B C D F 2) PassFailActivity Class - This class holds a numeric score and determines whether the score is passing or failing. The getGrade() method returns a letter grade determined from the score field. This method overrides the superclass method. 3) PassFailExam Class - This class determines a passing or failing grade for an exam. Graded Activity -score: double + setScore(s: double): void + getScore(): double + getGrade(): char PassFailActivity -minPassingScore: double + PassFailActivity(mps: double) + getGrade(): char PassFail Exam numQuestions: int -pointsEach: double -numMissed: int + PassFailExam(questions: int, missed: int, minPassing: double) The constructor sets the number of questions, the number of questions missed, and the minimum passing score. Calculate the points for each question and the numeric score for this exam. pointsEach = 100.0 / questions; numericScore = 100.0 - (missed* points Each) The main class should consists of objects to test the various methods in the classes given. + getPoints Each(): double +getNumMissed(): int

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
Please help me with part A and B using java. Include comments explaining each line of code
PART A
The following UML diagram indicates the different classes and the inheritance structure used. Using
this as a guide develop a program that demonstrates the working of this UML Diagram.
1) The Graded Activity Class
The getGrade() - works on the table given below.
Score
90
80
70
60
<60
Grade
A
B
C
D
F
2) PassFailActivity Class - This class holds a numeric score and
determines whether the score is passing or failing.
The getGrade() method returns a letter grade determined from
the score field. This method overrides the superclass method.
3) PassFailExam Class - This class determines a passing or failing
ade for an exam.
GradedActivity
-score: double
+setScore(s: double): void
+getScore(): double
+getGrade(): char
PassFailActivity
-minPassingScore: double
+ PassFailActivity (mps: double)
+ getGrade(): char
PassFailExam
-numQuestions: int
-points Each: double
- numMissed: int
+ PassFail Exam(questions: int,
missed: int,
minPassing: double)
+ getPoints Each(): double
+ getNumMissed(): int
The constructor sets the number of questions, the number of
questions missed, and the minimum passing score.
Calculate the points for each question and the numeric score for
this exam.
pointsEach 100.0 / questions;
numericScore 100.0 - (missed* points Each)
The main class should consists of objects to test the various methods in the classes given.
PART B
Add 2 additional methods to the PassFailExam class
public boolean equals(GradedActivity g)
public boolean greater (Graded Activity g)
Using two objects of the PassFailExam class compare whether the exam scores are equal or greater
and display the greater score. Demonstrate the class in a program.
Transcribed Image Text:PART A The following UML diagram indicates the different classes and the inheritance structure used. Using this as a guide develop a program that demonstrates the working of this UML Diagram. 1) The Graded Activity Class The getGrade() - works on the table given below. Score 90 80 70 60 <60 Grade A B C D F 2) PassFailActivity Class - This class holds a numeric score and determines whether the score is passing or failing. The getGrade() method returns a letter grade determined from the score field. This method overrides the superclass method. 3) PassFailExam Class - This class determines a passing or failing ade for an exam. GradedActivity -score: double +setScore(s: double): void +getScore(): double +getGrade(): char PassFailActivity -minPassingScore: double + PassFailActivity (mps: double) + getGrade(): char PassFailExam -numQuestions: int -points Each: double - numMissed: int + PassFail Exam(questions: int, missed: int, minPassing: double) + getPoints Each(): double + getNumMissed(): int The constructor sets the number of questions, the number of questions missed, and the minimum passing score. Calculate the points for each question and the numeric score for this exam. pointsEach 100.0 / questions; numericScore 100.0 - (missed* points Each) The main class should consists of objects to test the various methods in the classes given. PART B Add 2 additional methods to the PassFailExam class public boolean equals(GradedActivity g) public boolean greater (Graded Activity g) Using two objects of the PassFailExam class compare whether the exam scores are equal or greater and display the greater score. Demonstrate the class in a program.
Expert Solution
Step 1

Since there are multiple parts to a single question, we will answer the first three subparts for you (Part A) as per Expert Bartleby guidelines. If you want the answers to both parts, please post the parts separately.

steps

Step by step

Solved in 5 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY