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 grade for an exam. 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) 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 + PassFail Exam(questions:int, missed:int, minpassing: double) +getPoints Each(): double + getNumMissed(): int 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)

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
Please help me with this using java. Please use comments explaining each line of code. Please complete both part A and B
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
GradedActivity
-score: double
+ setScore(s: double): void
+ getScore(): double
+ getGrade(): char
A
PassFailActivity
-minPassingScore: double
+ PassFailActivity (mps: double)
+ getGrade(): char
4
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.
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* pointsEach)
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)
PassFailExam
-numQuestions: int
-points Each: double
-numMissed: int
+ PassFail Exam(questions: int,
missed: int,
minPassing: double)
+ getPointsEach(): double
+getNumMissed(): int
public boolean greater (Graded Activity g)
Using two objects of the PassFailExam class compare whether the exam scores are equal or greater
display t
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 GradedActivity -score: double + setScore(s: double): void + getScore(): double + getGrade(): char A PassFailActivity -minPassingScore: double + PassFailActivity (mps: double) + getGrade(): char 4 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. 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* pointsEach) 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) PassFailExam -numQuestions: int -points Each: double -numMissed: int + PassFail Exam(questions: int, missed: int, minPassing: double) + getPointsEach(): double +getNumMissed(): int public boolean greater (Graded Activity g) Using two objects of the PassFailExam class compare whether the exam scores are equal or greater display t
Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Class
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education