studentNumber and the major of a student. The class has the following me • computeTuitionFees, which returns the fees paid by a student each term • degreeToBeGranted, which returns the degree that will be grabnted to th successful graduation, and • changeMajor, which changes the major the student is pursuing. chods computeTuitionFees and degreeToBeGranted use complex conditional remove bad smells from the code, I have refactored the solution and prov s diagram below. Your task is to implement the following class diagran

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
(2e flaiks)
An object of class Student (download the code from Blackboard) stores the studentName,
the studentNumber and the major of a student. The class has the following methods:
FinalExamProblem-2
• computeTuitionFees, which returns the fees paid by a student each term,
• degreeToBeGranted, which returns the degree that will be grabnted to the student on
successful graduation, and
changeMajor, which changes the major the student is pursuing.
Methods computeTuitionFees and degreeToBeGranted use complex conditional statements.
To remove bad smells from the code, I have refactored the solution and provide a sample
class diagram below. Your task is to implement the following class diagram using Java
so that the purpose of the problem remains the same and still gives you the same output.
Use the same FinalExamProblemTwoMain class. You are not allowed to make any changes in
the FinalExamProblemTwoMain class.
UNRE
ERED UNREC
TERED UNREGISTERED UNREGISTERED
EGISTERED UNREGISTERED
Student
-studentNumber: String
-studentName: String
-majorObject: MajorType
+Student(studentNumber: String, studentName: String, major: String)
+compute TuitionFees( double
+degreeToBeGranted(): String
+changeMajor(newMajor: String): void
+toString(): String
EGISTER MajorType is an abstract ERED
claiss. compute TuitionFees
and degree ToBeGranted ERED
are abstract methods
EGIST
RED
UNR
STERED
EGISTER
UNREGISTERED
UNREGISTERED UNREGISTER
UNREGISTERED UNREGIST
UNREGISTERED UNREGISTERED
NREGISTERED
NREGISTERED
MajorType
+compute TuitionFees): double
+degree ToBeGranted): StringNREGISTERED
UNREGISTERED UNREGISTERED UNA GIS 4 R4 UNREGISTERED
EGISTEREDUNEEGIST
EG ComputerScienceMajor
UNREGISTERED
HED
+computeTuitionFees(k double
+degreeToBeGranted): String
ISTERED
UNREGISTERED
UNRE
FrenchMajor
createMajorObject
UNRa static method
UNREGISTF
REGcompute TuitionFees(): double
+degree ToBeGranted(): String
UNREG
Majorfactory
STERED UElectricalEngineeringMajorNREGISTERED
tcreateMajorObiectimajor. String): MajorTyne STERED Ucompute TuitionFees(): doubleNREGISTERED
+degreeToBeGranted(): String
Figure 1: A class diagram
Transcribed Image Text:(2e flaiks) An object of class Student (download the code from Blackboard) stores the studentName, the studentNumber and the major of a student. The class has the following methods: FinalExamProblem-2 • computeTuitionFees, which returns the fees paid by a student each term, • degreeToBeGranted, which returns the degree that will be grabnted to the student on successful graduation, and changeMajor, which changes the major the student is pursuing. Methods computeTuitionFees and degreeToBeGranted use complex conditional statements. To remove bad smells from the code, I have refactored the solution and provide a sample class diagram below. Your task is to implement the following class diagram using Java so that the purpose of the problem remains the same and still gives you the same output. Use the same FinalExamProblemTwoMain class. You are not allowed to make any changes in the FinalExamProblemTwoMain class. UNRE ERED UNREC TERED UNREGISTERED UNREGISTERED EGISTERED UNREGISTERED Student -studentNumber: String -studentName: String -majorObject: MajorType +Student(studentNumber: String, studentName: String, major: String) +compute TuitionFees( double +degreeToBeGranted(): String +changeMajor(newMajor: String): void +toString(): String EGISTER MajorType is an abstract ERED claiss. compute TuitionFees and degree ToBeGranted ERED are abstract methods EGIST RED UNR STERED EGISTER UNREGISTERED UNREGISTERED UNREGISTER UNREGISTERED UNREGIST UNREGISTERED UNREGISTERED NREGISTERED NREGISTERED MajorType +compute TuitionFees): double +degree ToBeGranted): StringNREGISTERED UNREGISTERED UNREGISTERED UNA GIS 4 R4 UNREGISTERED EGISTEREDUNEEGIST EG ComputerScienceMajor UNREGISTERED HED +computeTuitionFees(k double +degreeToBeGranted): String ISTERED UNREGISTERED UNRE FrenchMajor createMajorObject UNRa static method UNREGISTF REGcompute TuitionFees(): double +degree ToBeGranted(): String UNREG Majorfactory STERED UElectricalEngineeringMajorNREGISTERED tcreateMajorObiectimajor. String): MajorTyne STERED Ucompute TuitionFees(): doubleNREGISTERED +degreeToBeGranted(): String Figure 1: A class diagram
Expert Solution
steps

Step by step

Solved in 3 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