Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hello, I have the structure of code, could you please complete the code with the requirements. Thank you! In your program perform functions to addStudent(),

Hello, I have the structure of code, could you please complete the code with the requirements.

Thank you!

In your program perform functions to addStudent(), addCourse(), calculateStudentCourseGrade(), calculateStudentGPA(), displayStudentInfo(), displayCourseInfo(), printClass() and calculateCourseAverage().

Please remember that you are not allowed to use any global variables. All variables used must be local variables. Please detail variables as they appear in memory using a diagram. Please provide your flowcharts and technical explanations to the programs along with well documented source code files.

Inside the main() function, along with other variables you need, use the variable courses_t courseClass; to both populate the class data and student data, as well as to display them.

Please note that a student cannot get a grade below 0 or a grade above 100, and your program must make sure that input given by user is within the range. Please also note that letter grades are AA is 4.00 and awarded for a grade 100 90, BA is 3.5 and awarded for a grade 85 89, BB is 3.00 and awarded for a grade 84 80, CB is 2.50 and awarded for a grade 79 75, CC is 2.00 and awarded for a grade 74 70, DC is 1.50 and awarded for a grade 69 60, DD is 1.00 and awarded for a grade 59 50 and FF is 0.00 and awarded for a grade49 0. The GPA must be between 0.00 to 4.00 and should always be displayed in the correct format.

#define CLASSSIZE 35 // classroom capasity #define STUDENTNUMBERLENGTH 10 // how many digits in the student Number #define NAMELENGTH 25 // name length #define COURSENAMELENGTH 50 #define COURSECODELENGTH 10 #define COURSESREGISTERED 5 // registered courses #define MID_TERMWEIGHT 30 // midter_m %30 #define FINAL_WEIGHT 30 // FINAL %30 #define QUIZWEIGHT 20 // QUIZ %20 #define HOMEWORKWEIGHT 20 // HW %20

typedef struct fullName{ char *name; char *surname; }name_t; typedef struct GivenGrades{ double mid__term; double final; double quiz; double homework; v }grades_t;

typedef struct courseRegistered{ char courseName[COURSENAMELENGTH]; char courseCode[COURSECODELENGTH]; grades_t grades; char letterGrade[2]; double numericGrade; }courseReg_t;

typedef struct studentInfo{ name_t studentName; char *studentNo; courseReg_t *courses[COURSESREGISTERED]; double gpa; }student_t;

typedef struct courseInfo{ //ders bilgi char courseName[COURSENAMELENGTH]; char courseCode[COURSECODELENGTH]; student_t students[CLASSSIZE]; double courseAverage; }courses_t;

int main(){ // :( // :(

// :( return 0; }

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

Database Security XI Status And Prospects

Authors: T.Y. Lin, Shelly Qian

1st Edition

0412820900, 978-0412820908

More Books

Students also viewed these Databases questions