// DO NOT CHANGE ANYTHING IN THIS CLASS (DriverClass) public static void main(String[] args) { Student s; S = new PhdStudent ("Zaydoun BenSellam", "zb5954", "Ga "Gary Richarson", "Fuzzy Topology", 2599 ); s.printInvoice (); int[] gradCrns Taken = {7587,8997); s= new MsStudent ( "Emily Jones", "em1254", gradCrns Taken, 1997); s.printInvoice (); int[] undergradCrns Taken = (4587,2599); s new Undergraduate Student ("Jamila Jones". "ja radCrns Taken, "ja5225", 3.0, false); s.printInvoice (); }//end of main } abstract class Student { public Student String name } abstract public void printInvoice (); } class Undergraduate Student extends Student { public Undergraduate Student (String name, String id, int [] undergradCrns Taken, double gpa, boolean resident) { super (name, id); } String name, String id) { @Override public void printInvoice () { } } abstract class Graduate Student extends Student { public GraduateStudent ( String name, String id, int crn) { //crn is the crn that the grad student is a teaching assistant for super name, id); } } class PhdStudent extends Graduate Student { // ・・・ public PhdStudent (String name, String id, String advisor, String research Subject, int crn) { //crn is the course number that the Phd student is a teaching assistant for super name, id, crn); } @Override public void printInvoice () { } } class Ms Student extends Graduate Student { public MsStudent (String name, String id, int [] gradCrns Taken, int crn) { //gradCourses Taken is the array of the crns that the Ms student is taking //crn is the course number that the Phd student is a teaching assistant for super name, id, crn); } @Override public void printInvoice () { } Create a fee invoice application for students attending Valence College, a college in the State of Florida. There are two types of students: graduate and undergraduate. Out-of-state undergraduate students pay twice the tuition of Florida-resident undergraduate students (all students pay the same health and id fees). A graduate student is either a PhD or a MS student. PhD students don't take any courses, but each has an advisor and a research subject. Each Ms and Phd student must be a teaching assistant for one undergraduate course. MS students can only take graduate courses. A course with a Course Number (crn) less than 5000 is considered an undergraduate course, and courses with a 5000 crn or higher are graduate courses. CRN Course Credit Hours. 4587 MAT 236 4 4599 COP 220 3 8997 GOL 124 1 9696 COP 100 3 4580 MAT 136 1 2599 COP 260 3 1997 CAP 424 1 5696 KOL 110 2 7587 MAT 936 5 2599 COP 111 3 6997 GOL 109 1 2696 COP 101 3 5580 MAT 636 2 2099 COP 268 3 4997 CAP 427 1 3696 KOL 910 2 Example of an MS student Name Emily Jones Id em1254 Courses taken 7587 and 8997 TA for 1997 Example of an PhD student: Name Zaydoun BenSellam Id zb5954 Advisor Gary Richarson Research Subject Fuzzy Topology TA for 2599 It costs, for undergraduate Florida residents, $120.25 per credit hour, and all MS students pay $300 per credit hour. in addition to $35.00 charged for health and id services. Undergraduate Students with gpa of 3.5 or higher receive a discount of 25% when the total payments exceed $500. PhD students pay a separate research fee of $700. A fee invoice for an undergraduate student should look like VALENCE COLLEGE ORLANDO FL 10101 Fee Invoice Prepared for Student: KJ2959-KARIM JONES (Karim, a FL resident, has gpa higher than 3.5 gpa). 1 Credit Hour = $120.25 CRN CR_PREFIX CR HOURS 4599 COP 220 3 $ 360.75 4587 MAT 236 4 $ 481.00 $35.00 Health & id fees $ 876.75 -$219.18 TOTAL PAYMENTS $ 657.56 A fee invoice for an MS student should look like. VALENCE COLLEGE ORLANDO FL 10101 Fee Invoice Prepared for Student: KA2959-ERICKA JUNAID 1 Credit Hour = $300.00 CRN CR PREFIX CR HOURS 6997 GOL 109 1 $ 300.00 Health & id fees $35.00 tal Payments $335.00 A fee invoice for an PhD student should look like VALENCE COLLEGE ORLANDO FL 10101 Fee Invoice Prepared for Student: J02978-John JUNAID John's research subject: Climate Change RESEARCH Climate Change $ 700.00 Health & id fees $ 35.00 Total Payments $ 735.00 1) In addition to the DriverClass class, you will need to add all the classes shown on the inheritance hierarchy shown above. (Student, Graduate Student, Undergraduate Student, Ms Student and PhdStudent). Both Student and Graduate Student are to be made abstract. The Student class must contain the abstract method: abstract public void printInvoice (); 2) The abstract method, printInvoice, is to be overridden to display the right fee invoice, depending on the type of the student. Data fields of all classes are to be made private. 3) Do not change anything in the DriverClass.java (see skeleton below). You may add your own methods or data whenever you see that becomes necessary. Just don't duplicate code! 4) Your job is to add the necessary code. public class DriverClass {
// DO NOT CHANGE ANYTHING IN THIS CLASS (DriverClass) public static void main(String[] args) { Student s; S = new PhdStudent ("Zaydoun BenSellam", "zb5954", "Ga "Gary Richarson", "Fuzzy Topology", 2599 ); s.printInvoice (); int[] gradCrns Taken = {7587,8997); s= new MsStudent ( "Emily Jones", "em1254", gradCrns Taken, 1997); s.printInvoice (); int[] undergradCrns Taken = (4587,2599); s new Undergraduate Student ("Jamila Jones". "ja radCrns Taken, "ja5225", 3.0, false); s.printInvoice (); }//end of main } abstract class Student { public Student String name } abstract public void printInvoice (); } class Undergraduate Student extends Student { public Undergraduate Student (String name, String id, int [] undergradCrns Taken, double gpa, boolean resident) { super (name, id); } String name, String id) { @Override public void printInvoice () { } } abstract class Graduate Student extends Student { public GraduateStudent ( String name, String id, int crn) { //crn is the crn that the grad student is a teaching assistant for super name, id); } } class PhdStudent extends Graduate Student { // ・・・ public PhdStudent (String name, String id, String advisor, String research Subject, int crn) { //crn is the course number that the Phd student is a teaching assistant for super name, id, crn); } @Override public void printInvoice () { } } class Ms Student extends Graduate Student { public MsStudent (String name, String id, int [] gradCrns Taken, int crn) { //gradCourses Taken is the array of the crns that the Ms student is taking //crn is the course number that the Phd student is a teaching assistant for super name, id, crn); } @Override public void printInvoice () { } Create a fee invoice application for students attending Valence College, a college in the State of Florida. There are two types of students: graduate and undergraduate. Out-of-state undergraduate students pay twice the tuition of Florida-resident undergraduate students (all students pay the same health and id fees). A graduate student is either a PhD or a MS student. PhD students don't take any courses, but each has an advisor and a research subject. Each Ms and Phd student must be a teaching assistant for one undergraduate course. MS students can only take graduate courses. A course with a Course Number (crn) less than 5000 is considered an undergraduate course, and courses with a 5000 crn or higher are graduate courses. CRN Course Credit Hours. 4587 MAT 236 4 4599 COP 220 3 8997 GOL 124 1 9696 COP 100 3 4580 MAT 136 1 2599 COP 260 3 1997 CAP 424 1 5696 KOL 110 2 7587 MAT 936 5 2599 COP 111 3 6997 GOL 109 1 2696 COP 101 3 5580 MAT 636 2 2099 COP 268 3 4997 CAP 427 1 3696 KOL 910 2 Example of an MS student Name Emily Jones Id em1254 Courses taken 7587 and 8997 TA for 1997 Example of an PhD student: Name Zaydoun BenSellam Id zb5954 Advisor Gary Richarson Research Subject Fuzzy Topology TA for 2599 It costs, for undergraduate Florida residents, $120.25 per credit hour, and all MS students pay $300 per credit hour. in addition to $35.00 charged for health and id services. Undergraduate Students with gpa of 3.5 or higher receive a discount of 25% when the total payments exceed $500. PhD students pay a separate research fee of $700. A fee invoice for an undergraduate student should look like VALENCE COLLEGE ORLANDO FL 10101 Fee Invoice Prepared for Student: KJ2959-KARIM JONES (Karim, a FL resident, has gpa higher than 3.5 gpa). 1 Credit Hour = $120.25 CRN CR_PREFIX CR HOURS 4599 COP 220 3 $ 360.75 4587 MAT 236 4 $ 481.00 $35.00 Health & id fees $ 876.75 -$219.18 TOTAL PAYMENTS $ 657.56 A fee invoice for an MS student should look like. VALENCE COLLEGE ORLANDO FL 10101 Fee Invoice Prepared for Student: KA2959-ERICKA JUNAID 1 Credit Hour = $300.00 CRN CR PREFIX CR HOURS 6997 GOL 109 1 $ 300.00 Health & id fees $35.00 tal Payments $335.00 A fee invoice for an PhD student should look like VALENCE COLLEGE ORLANDO FL 10101 Fee Invoice Prepared for Student: J02978-John JUNAID John's research subject: Climate Change RESEARCH Climate Change $ 700.00 Health & id fees $ 35.00 Total Payments $ 735.00 1) In addition to the DriverClass class, you will need to add all the classes shown on the inheritance hierarchy shown above. (Student, Graduate Student, Undergraduate Student, Ms Student and PhdStudent). Both Student and Graduate Student are to be made abstract. The Student class must contain the abstract method: abstract public void printInvoice (); 2) The abstract method, printInvoice, is to be overridden to display the right fee invoice, depending on the type of the student. Data fields of all classes are to be made private. 3) Do not change anything in the DriverClass.java (see skeleton below). You may add your own methods or data whenever you see that becomes necessary. Just don't duplicate code! 4) Your job is to add the necessary code. public class DriverClass {
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
Question
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 1 steps
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