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)
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
Related questions
Concept explainers
OOPs
In today's technology-driven world, computer programming skills are in high demand. The object-oriented programming (OOP) approach is very much useful while designing and maintaining software programs. Object-oriented programming (OOP) is a basic programming paradigm that almost every developer has used at some stage in their career.
Constructor
The easiest way to think of a constructor in object-oriented programming (OOP) languages is:
Question
Please help me with this using java. Please use comments explaining each line of code. Please complete both part A and B
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 3 steps with 1 images
Knowledge Booster
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.Recommended textbooks for you
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)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
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)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education