Question: In this assignment, required to implement different functions to handle a List Data Structure implemented using array in C. required to use an array of
In this assignment, required to implement different functions to handle a List Data Structure implemented using array in C.
required to use an array of structures and files in C by developing a GPA Calculation Application. The application should maintain and store course grades as a list of courses for a student. The application should display a menu of operations that handles update, find maximum grade, display, compute the accumulative GPA[check appendix about how to calculate GPA ], and save the grades to the file course grades.
- Create a structure data type called Coursethat contains the following information: Course ID, Course Credit and Grade. and need to implement the following:
- courseID as a sequence of characters (e.g. Prog20799).
- credits as an integerthat represents the credit of the course (e.g. 6).
- grade as a float that represents the grade of the course(e.g. 85)
- Create an array of 4 courses. Please use define MAX_COURSES 4.
- Read 4 courses from the file(grades.txt) in the main function before calling the menu function. The input file called grades.txt is attached with the assignment.
- Perform Menu-Operations:
- Update a course grade in the list of course.
- void updateCourseGrade(Course courses[])
- Find Maximum Grade. This can be a recursive function (optional) and you need to implement.
- float max(float n1, float n2)
- float findMaxGrade(Course courses[], int n)
- Display a list of courses taken by the student.
- void display(Course courses[])
- Compute the accumulative GPA for all courses.
- float gradePoints(float grade) - return the grade point of a grade e.g. if grade = 90 then grade point = 4.
- float computeGPA(Course courses[])- return GPA for all courses
- Save all courses and grades in an output file called "output.txt"
- void saveCourses(char str[], Course courses[])
- Answer the following questions .
- What are the data types used in this program?
- Can you explain how the program works, step by step?
- explain any algorithms (e.g., Sorting/searching) or techniques you used in your program? [5 points]
- How are data allocated for the array?
- What challenges face when writing the program and how to overcome them?
- explain how the functions in your program are designed to improve modularity, code organization and reusability.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
