Programming C Project

Posted Under: C

Ask A Question
DESCRIPTION
Posted
Modified
Viewed 15
I just need the required code that solves this problem. It can be in a text file so I can copy and paste later.

This order does not have tags, yet.

Attachments
COP 2220 – Computer Programming I Project 4 Points: 100 Objectives: • Demonstrate the use of user defined functions. • Demonstrate the use of an array of arrays. • Demonstrate the use of file pointers. • Demonstrate the ability to read a file and process the data. • Demonstrate the use of string processing and character conversions. • Demonstrate the use of a dynamic memory function calloc() or malloc(). Problem: You are tasked to write a program that will perform a statistical analysis of student records. Your program will open a text file (provided) and store the values read into an array (2d). Your program will then close the input file and process the data. Your program will print out the records to screen and will then print out the average quiz scores per student. For each student in the provided text input file there is a name of up to 20 characters, an id number of five alphanumeric values (n1234), 4 exam grades in order: exam 1 – exam 4. You may use a fixed 2d array size of 80 characters for the input file name. You must use a dynamic array for at least one task in your program. You may declare your filename array using calloc or malloc to satisfy this requirement. If you’re a CS student, you really should try to use a dynamically constructed 3d array as demonstrated in the module videos. Get it working and make a backup first if this troubles you. You may use a fixed size of the student data array to hold up to 10 students. Example Input and Output (Yours does not have to be identical, this is an example): Rubric: 1. Your program should make use of a user defined function employing an array and a pointer to prompt the user for the name of the input file to process. -10 (If you hard code the filename of the provided input file you will miss these points.). 2. Your program should be able to report back an error if the input file cannot be found. If you hard code the file name you will be docked -10 points even if you have a function to get the filename. 3. Your program should make use of a user defined function to load the data into an array, passing the array as an argument from the calling function. -15 if you do not do this or do not use a user defined function. You may use a hard coded array. 4. Your program must produce the correct statistics given the test data shown (no hard-coded values). -15 5. Your output must align. Use a minimum width specifier that will accommodate. Recall that you can use justification as well for string outputs. -5 6. Your output must show precision to within a hundredths place. -5 7. You must properly provide for program and function descriptions. -10 8. No global variables unless they are defined constants. -20 9. Your program must use an array of arrays. I suggest and array of 10 character arrays. -20 10. You must make use of at least one dynamically allocated array. -10; Note: If your program will not compile, you will receive a zero, check your code by compiling it on osprey before turning it in. If your program does not process the file using a FILE pointer, does not produce desired output you may receive a zero. Advice: Layout the steps to solve and do them one step at a time (incremental development). Prove each step works before moving to the next step. If you are not able to make use of memory allocation functions hard code the array size. Recall that you can use the atof() function to convert alphanumeric numbers into double type numbers. Make certain that you read the grading rubric and understand the points deductions. Example input: Each line/record in the input file is like this. Julie 1234 52.5 7 100 Turnin Code: larry.cop2220.p4
Explanations and Answers 0

No answers posted

Post your Answer - free or at a fee

Login to your tutor account to post an answer

Posting a free answer earns you +20 points.

Login

NB: Post a homework question for free and get answers - free or paid homework help.

Get answers to: Programming C Project or similar questions only at Tutlance.

Related Questions