Answered step by step
Verified Expert Solution
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
AddDelete course for student
Search for student
Print fee invoice
Print fee invoice sorted by course numbercrn
Note it costs dollars per credit hour in addition to $ charged for health and id services. Students with gpa of or higher receive a discount of when the total payments exceed $Valence College offers the following courses:
CRN Course CreditHours
MAT
COP
GOL
COP
MAT
COP
CAP
KOL
Fee invoice should look like
VALENCE COLLEGE
ORLANDO FL
Fee Invoice Prepared for Student:
KARIM JONES
Credit Hour$
CRN CRPREFIX CRHOURS
COP $
MAT $
Health & id fees $
Total Payments$
Create three classes: Student, College and DriverClass.
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: Studentstring 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.
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.
The DriverClass class contain:
private static College valenceCollege;
two methods, mainMenu, subMenu and main. The mainMenu is for
the main options, and subMenu for addingdeleting a crn
Sample Run
Choose from the following options:
Add a new student
AddDelete a course
Search for a student
Print fee invoice
Print fee invoice sorted by crn
Exit program
Enter your selection:
Enter the students id:
No Student found!
Choose from the following options:
Add a new student
AddDelete a course
Search for a student
Print fee invoice
Print fee invoice sorted by crn
Exit program
Enter your selection:
Enter the students id:
Sorry is already assigned to another student Assume that already exists in this sample run.
Enter how many courses John Smith is taking?
Enter the course numbers
Enter John Smiths current gpa:
Student added successfully!
Choose from the following options:
Add a new student
AddDelete a course
Search for a student
Print fee invoice
Print fee invoice sorted by crn
Exit program
Enter your selection:
Enter the students id:
VALENCE COLLEGE
ORLANDO FL
Fee Invoice Prepared for Student:
DANIEL TAZI
Credit Hour $
CRN CRPREFIX CRHOURS
MAT $
COP $
Health & id fees $
$
$
TOTAL PAYMENTS$
Choose from the following options:
Add a new student
AddDelete a course
Search for a student
Print fee invoice
Print fee invoice sorted by crn
Exit program
Enter your selection
Enter the students id:
Here are the courses DANIEl TAZI is taking:
CRN PREFIX CR HOURS
MAT
COP
Choose from
AAdd a new course for DANIEL TAZI
DDelete a course from DANIEL TAZIs schedule
C Cancel operation
Enter your selection:d
Enter course Number to delete:
COP is deleted successfully!
Want to display new invoice? YN y
VALENCE COLLEGE
ORLANDO FL
Fee Invoice Prepared for Student
Dani Credit Hour$
CRN CRPREFIX CRHOURS
MAT $
Health $ id fees $
Total Payments $
Choose from the following options
Add a new student
Exit
Enter:
Goodbye
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started