Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a fee invoice application for students attending Valence College. This time, we consider more than one student, and each student may take more or

Create a fee invoice application for students attending Valence College. This time, we consider more than one student, and each student may take more or less than two classes. This is going to be a menu based application where the main menu options are:
Add a new student
Add/Delete course for student
Search for student
Print fee invoice
Print fee invoice sorted by course number(crn)
Note it costs 120.25 dollars per credit hour in addition to $35.00 charged for health and id services. Students with gpa of 3.5 or higher receive a discount of 25% when the total payments exceed $700.Valence College offers the following courses:
CRN Course CreditHours
4587MAT 2364
4599COP2203
8997GOL1241
9696COP1003
4580MAT1361
2599COP2603
1997CAP4241
3696KOL1102
Fee invoice should look like
VALENCE COLLEGE
ORLANDO FL 10101
----
Fee Invoice Prepared for Student:
2959-KARIM JONES
1 Credit Hour=$120.25
CRN CR_PREFIX CR_HOURS
4599 COP 2203 $ 360.75
4587 MAT 2364 $ 481.00
Health & id fees $ 35.00
----
Total Payments$876.75
Create three classes: Student, College and DriverClass.
1) Student class contains:
studentID: int, the students identification #
studentName: String, the students name
gpa: double, the student's current gpa
listOfCrns: ArrayList of Integer (The wrapper class Integer) to
store the course numbers taken by the student
- Setters and getters for studentId, studentName and gpa.
- One constructor: Student(string studentName ,int studentid ,
double gpa; ArrayList listOfCrns )
- private double calculateTotalPayment () to return the total
payment amount.
- public void printFeeInvoice () to print the invoice as shown
in the sample run below. Note that this method should call
calculateTotalPayment to get the total amount.
2) The College class contains the following fields and methods:
- list: ArrayList of Student, to store the students
_______
- public void enrollStudent (): adds a student to list
- public boolean searchById ( int studentId): returns true if
studentId is found to be the id of a student in list (false
otherwise)
- public boolean addCourse ( int studentId, int crn ): returns
true if crn can be added to listOfCrns, the list of courses of
the student whose id number is studentId .
- public boolean deleteCourse ( int studentId , int crn ):
returns true if crn can be deleted from listOfCrns, the list
of courses of the student whose identification number number
is studentId.
- public void printInvoice ( int studentId ): prints the fee invoice for the student whose identification number is studentId.
- public void printSortedInvoice (int studentId ): prints the
fee invoice, sorted by course number, for the student whose identification number is studentId. Note that you should not sort the private field listOfCrns of the Student class.
3) The DriverClass class contain:
- private static College valenceCollege;
- two methods, mainMenu, subMenu and main. The mainMenu is for
the main options, and subMenu for adding/deleting a crn.
Sample Run
Choose from the following options:
1-Add a new student
2-Add/Delete a course
3-Search for a student
4-Print fee invoice
5-Print fee invoice sorted by crn
0-Exit program
Enter your selection: 3
Enter the students id:8989
No Student found!
Choose from the following options:
1-Add a new student
2-Add/Delete a course
3-Search for a student
4-Print fee invoice
5-Print fee invoice sorted by crn
0-Exit program
Enter your selection:1
Enter the students id:5959
Sorry 5659 is already assigned to another student *Assume that 5959 already exists in this sample run.
Enter how many courses John Smith is taking?
2
Enter the 2 course numbers
45874599
Enter John Smiths current gpa:
2.75
Student added successfully!
Choose from the following options:
1-Add a new student
2-Add/Delete a course
3-Search for a student
4-Print fee invoice
5-Print fee invoice sorted by crn
0-Exit program
Enter your selection:5
Enter the students id:5959
VALENCE COLLEGE
ORLANDO FL 10101
--
Fee Invoice Prepared for Student:
5959-DANIEL TAZI
1 Credit Hour = $120.25
CRN CR_PREFIX CR_HOURS
4587 MAT 2364 $ 481
4599 COP 2203 $ 360.75
Health & id fees $ 35
--
$ 876.75
-$ 219.18
-
TOTAL PAYMENTS$657.56
Choose from the following options:
1-Add a new student
2-Add/Delete a course
3-Search for a student
4-Print fee invoice
5-Print fee invoice sorted by crn
0-Exit program
Enter your selection 2
Enter the students id:5959
Here are the courses [DANIEl TAZI] is taking:
CRN PREFIX CR. HOURS
4587 MAT 2364
4599 COP 2203
Choose from
A-Add a new course for [DANIEL TAZI]
D-Delete a course from [DANIEL TAZI]'s schedule
C- Cancel operation
Enter your selection:d
Enter course Number to delete:4599
[4599/COP 220] is deleted successfully!
Want to display new invoice? Y/N y
VALENCE COLLEGE
ORLANDO FL 10101
--
Fee Invoice Prepared for Student
5959-Dani1 Credit Hour=$120.25
CRN CR_PREFIX CR_HOURS
4588 MAT 2364 $481
Health $ id fees $35
Total Payments $516
Choose from the following options
1- Add a new student
0-Exit
Enter:0
Goodbye
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

New Trends In Databases And Information Systems Adbis 2019 Short Papers Workshops Bbigap Qauca Sembdm Simpda M2p Madeisd And Doctoral Consortium Bled Slovenia September 8 11 2019 Proceedings

Authors: Tatjana Welzer ,Johann Eder ,Vili Podgorelec ,Robert Wrembel ,Mirjana Ivanovic ,Johann Gamper ,Mikolaj Morzy ,Theodoros Tzouramanis ,Jerome Darmont

1st Edition

3030302776, 978-3030302771

More Books

Students also viewed these Databases questions