At Valence community college, a student can't take more than 3 courses under the constraint of having no more than 7 credit hours. The purpose of this assignment is to construct a fee invoice for a student. This requires the input of Students id as integer and the course numbers.

It costs 120.25 dollars per credit hour in addition to $35.00 charged for health and id services.

Here is the list of all courses Valence Community College offers:

CRN Course Prefix Credit Hours
4587 MAT 236 4
4599 COP 220 3
8997 GOL 124 1
9696 COP 100 5
4580 MAT 230 3
4581 MAT 231 4
4582 MAT 232 2
4583 MAT 233 2
3587 MAT 256 4
4519 COP 420 3
6997 GOL 127 1
9494 COP 101 3

After inputting all the necessary data (see sample run), a fee invoice as shown below should be printed to the screen.

VALENCE COMMUNITY COLLEGE
ORLANDO FL 10101
---------------------
Fee Invoice Prepared for Student V5656
1 Credit Hour = $120.25
CRN CR_PREFIX CR_HOURS
4587 MAT 236 4 $ 481.00
4599 COP 220 3 $ 360.75
Health & id fees $ 35.00
--------------------------------------
Total Payments $ 876.75

You may assume that the user will always enter different crns (but if you feel ambitious, you may add the code to checks for that. Please don't ask for extra credit for that)

Sample Run 1(The user's entry is in bold)

Enter the Students Id
5656
Enter how many courses-up to 3
2
Enter the 2 course number(s)
4587 4599
VALENCE COMMUNITY COLLEGE
ORLANDO FL 10101
---------------------
Fee Invoice Prepared for Student V5656
1 Credit Hour = $120.25
CRN CR_PREFIX CR_HOURS
4587 MAT 236 4 $ 481.00
4599 COP 220 3 $ 360.75
Health & id fees $ 35.00
--------------------------------------
Total Payments $ 876.75
Would you like to print another invoice? Y=yes, N=No
R
Invalid Entry (it has to be y or n): n
Goodbye!

Sample Run 2(The user's entry is in bold)

Enter the Students Id
5656
Enter how many courses-up to 3
6
Invalid number of courses (up to 3)
0
VALENCE COMMUNITY COLLEGE
ORLANDO FL 10101
---------------------
Fee Invoice Prepared for Student V5656
1 Credit Hour = $120.25
CRN CR_PREFIX CR_HOURS
Health & id fees $ 35.00
--------------------------------------
Total Payments $ 35.00
Would you like to print another invoice? Y=yes, N=No
Y
Enter the Students Id
8975
Enter how many courses-up to 3
2
Enter the 2 course number(s)
4587 9696
Sorry we can’t process more than 7 credit hours!
Would you like to print another invoice? Y=yes, N=No
Y
Enter the Students Id
7892
Enter how many courses-up to 3
3
Enter the 3 course number(s)
8858 8256 4887
Sorry invalid crn(s)!
Would you like to print another invoice? Y=yes, N=No
N
Goodbye!

Sample Run 3 (The user's entry is in bold)

Enter the Students Id
5656
Enter how many courses-up to 3
3
Enter the 3 course number(s)
8997 6997 9696
VALENCE COMMUNITY COLLEGE
ORLANDO FL 10101
---------------------
Fee Invoice Prepared for Student V5656
1 Credit Hour = $120.25
CRN CR_PREFIX CR_HOURS
8997 GOL 124 1 $ 120.25
6997 GOL 127 1 $ 120.25
9696 COP 100 5 $ 601.25
Health & id fees $ 35.00
--------------------------------------
Total Payments $ 876.75
Would you like to print another invoice? Y=yes, N=No
N
Goodbye!
Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.