Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hello! This is for Programming in C. Below is the program instruction and what the sample runs should look like. COP 3223 C Programming e

Hello! This is for Programming in C. Below is the program instruction and what the sample runs should look like.

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

COP 3223 C Programming e UCF) Learning Outcomes: Functions and Pointers Read carefully before you start coding! 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 Student's 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. In this project, functions must be used (no redundant code is allowed this time) A hint is provided at the end of this document. Add functions as you see fit. Bottom line: Have the cleanest (minimum lines of code possible) program. This is a great opportunity to work in groups by having each student taking care of function or two and then meet to put everything together.. Here is the list of all courses Valence Community College offers: Course Prefix MAT 236 COP 220 GOL 124 COP 100 MAT 230 MAT 231 MAT 232 MAT 233 MAT 256 COP 420 GOL 127 COP 101 Credit Hours CRN 4587 4599 8997 9696 4580 4581 4582 4583 3587 4519 6997 9494 2 4 After inputting all the necessary data (see sample run), a fee invoice as shown below should be printed t the screen. VALENCE COMMUNITY COLLEGE ORLANDO FL 10101 Fee Invoice Prepared for Student V5656 1 Credit Hour$120.25 CRN CR PREFIXCR HOURS 4587 MAT 236 4599 COP 220 $ 481.00 360.75 Health & id fees S35.00 Total Payments 876.75 You may assume that the user will always enter different erns (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 PREFIXCR HOURS 4587 MAT 236 4599 COF 220 481.00 S 360.75 Health& id fees 35.00 Total Payments876-75 Nould 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 Invalid number of courses (up to 3) VALENCE COMMUNITY COLLEGE ORLANDO FL 10101 Fee Invoice Prepared for Student V5656 1 Credit Hour-$120.25 CRN CR PREFIXCR HOURS Health& id fees 35.00 Total Payments35.00 Would you like to print another invoice? Y=yes , =No 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! Nould you like to print another invoice? Y-yes, N-No 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)! Nould you like to print another invoice? Y-yes, N-No 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 8997GOL 124 6997 GOL 127 9696 COP 100 1 120.25 1 120.25 601.25 5 Health & id fees 35.00 Total Payments876-75 Nould you like to print another invoice? Y-yes,N-No Goodbye! /Hint: # include //hint for Project 4 int checkCrn int crn):/ returns 1 if crn is OK, 0 otherwise int getCreditHours int ern I/ returns the credit hours of ern char printPrefix int crn) //prints the prefix of ern void main() int crnl, crn2, crn3: printf ("Enter your three course numbers ) scanf ("%didid", &arnl , &crn2, &crn3); if (checkCrn (ernl)*checkCrn (ern2) checkCrn (ern3)) printf Invalid crn!n else printf printf printf ("%d\t%s\tidla", ("%d\t%s\tidla", ("%d\t%s\tidla", crni, crn2, crn3, printPrefix printPrefix printPrefix (crn!), (cm2), (crn3), getCreditHours (crnl)); getCreditHours (crn2)); getCreditHours (cm3)); int checkCrn int crn) if crn !9696 return 1; crn!-4587 &&crn4599 return 0 int getCreditHours int crn) switch crn) case 9696: return 5: case 4587: return 3: case 4599: return 1: char printPrefix int crn) switch crn) case 9696: return "MAT 111 case 4587: return "COP 222" case 4599: return "STA 200"; COP 3223 C Programming e UCF) Learning Outcomes: Functions and Pointers Read carefully before you start coding! 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 Student's 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. In this project, functions must be used (no redundant code is allowed this time) A hint is provided at the end of this document. Add functions as you see fit. Bottom line: Have the cleanest (minimum lines of code possible) program. This is a great opportunity to work in groups by having each student taking care of function or two and then meet to put everything together.. Here is the list of all courses Valence Community College offers: Course Prefix MAT 236 COP 220 GOL 124 COP 100 MAT 230 MAT 231 MAT 232 MAT 233 MAT 256 COP 420 GOL 127 COP 101 Credit Hours CRN 4587 4599 8997 9696 4580 4581 4582 4583 3587 4519 6997 9494 2 4 After inputting all the necessary data (see sample run), a fee invoice as shown below should be printed t the screen. VALENCE COMMUNITY COLLEGE ORLANDO FL 10101 Fee Invoice Prepared for Student V5656 1 Credit Hour$120.25 CRN CR PREFIXCR HOURS 4587 MAT 236 4599 COP 220 $ 481.00 360.75 Health & id fees S35.00 Total Payments 876.75 You may assume that the user will always enter different erns (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 PREFIXCR HOURS 4587 MAT 236 4599 COF 220 481.00 S 360.75 Health& id fees 35.00 Total Payments876-75 Nould 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 Invalid number of courses (up to 3) VALENCE COMMUNITY COLLEGE ORLANDO FL 10101 Fee Invoice Prepared for Student V5656 1 Credit Hour-$120.25 CRN CR PREFIXCR HOURS Health& id fees 35.00 Total Payments35.00 Would you like to print another invoice? Y=yes , =No 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! Nould you like to print another invoice? Y-yes, N-No 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)! Nould you like to print another invoice? Y-yes, N-No 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 8997GOL 124 6997 GOL 127 9696 COP 100 1 120.25 1 120.25 601.25 5 Health & id fees 35.00 Total Payments876-75 Nould you like to print another invoice? Y-yes,N-No Goodbye! /Hint: # include //hint for Project 4 int checkCrn int crn):/ returns 1 if crn is OK, 0 otherwise int getCreditHours int ern I/ returns the credit hours of ern char printPrefix int crn) //prints the prefix of ern void main() int crnl, crn2, crn3: printf ("Enter your three course numbers ) scanf ("%didid", &arnl , &crn2, &crn3); if (checkCrn (ernl)*checkCrn (ern2) checkCrn (ern3)) printf Invalid crn!n else printf printf printf ("%d\t%s\tidla", ("%d\t%s\tidla", ("%d\t%s\tidla", crni, crn2, crn3, printPrefix printPrefix printPrefix (crn!), (cm2), (crn3), getCreditHours (crnl)); getCreditHours (crn2)); getCreditHours (cm3)); int checkCrn int crn) if crn !9696 return 1; crn!-4587 &&crn4599 return 0 int getCreditHours int crn) switch crn) case 9696: return 5: case 4587: return 3: case 4599: return 1: char printPrefix int crn) switch crn) case 9696: return "MAT 111 case 4587: return "COP 222" case 4599: return "STA 200

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions

Question

What is the meaning and definition of E-Business?

Answered: 1 week ago