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.

  1. Create a structure data type called Coursethat contains the following information: Course ID, Course Credit and Grade. and need to implement the following:
  2. courseID as a sequence of characters (e.g. Prog20799).
  3. credits as an integerthat represents the credit of the course (e.g. 6).
  4. grade as a float that represents the grade of the course(e.g. 85)
  5. Create an array of 4 courses. Please use define MAX_COURSES 4.
  6. 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.
  7. Perform Menu-Operations:
  8. Update a course grade in the list of course.
    1. void updateCourseGrade(Course courses[])
  9. Find Maximum Grade. This can be a recursive function (optional) and you need to implement.
    1. float max(float n1, float n2)
    2. float findMaxGrade(Course courses[], int n)
  10. Display a list of courses taken by the student.
    1. void display(Course courses[])
  11. Compute the accumulative GPA for all courses.
    1. float gradePoints(float grade) - return the grade point of a grade e.g. if grade = 90 then grade point = 4.
    2. float computeGPA(Course courses[])- return GPA for all courses
  12. Save all courses and grades in an output file called "output.txt"
    1. void saveCourses(char str[], Course courses[])
  13. Answer the following questions .
    1. What are the data types used in this program?
    2. Can you explain how the program works, step by step?
    3. explain any algorithms (e.g., Sorting/searching) or techniques you used in your program? [5 points]
    4. How are data allocated for the array?
    5. What challenges face when writing the program and how to overcome them?
    6. 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!