Your program should run as follows: Setup: • Name your program files Student Info.c and Student Info.h. • Make sure the test file StudentMain.c is in the same directory as your program files. Your Student Info.h should contain the following: Structures: • Design and declare the following structures in studentInfo.h: • Subject : Contains members name (char array, array size MAX_STR) and mark (integer). • Student Info : Contains members lastName (char array, array size MAX_STR), studentId (integer), and subject (an array of subject structures, array size NUM_SUBJECTS). Function Prototypes: Declare the following function prototypes in StudentInfo.h: initializeInfo: returns void, accepts the address of struct Studentinfo averageMark: returns float, accepts the address of an array of struct Subject maximumMark: returns integer, accepts the address of an array of struct Subject • minimumMark: returns integer, accepts the address of an array of struct Subject #define MAX_STR 32 #define NUM_SUBJECTS 6 ● Function Definitions: Implement the functions in Student Info.c as described: initializeInfo: returns void, accepts the address of struct Studentinfo o Sets the last name to a null string. This can be accomplished by setting the first character in the last name array to the null terminator '\0'. o Sets the student id to e. ● 9 ● o Goes through the subject array (NUM_SUBJECTS) and for each subject sets name to a null string and sets mark to e. averageMark: Calculates the average mark from the provided subject marks. o Uses a for-next loop to go through all the marks (up to NUM_SUBJECTS). Once an invalid mark is reached (mark equals zero), the loop terminates o Returns the running total divided by the number of marks. maximumMark: Identifies and returns the index of the highest mark. o Uses a for-next loop to go through all the marks (up to NUM_SUBJECTS). Once an invalid mark is reached (mark equals zero), the loop terminates o The index of the maximum mark is returned ● minimumMark: Identifies and returns the index of the lowest mark. o Uses a for-next loop to go through all the marks (up to NUM_SUBJECTS). Once an invalid mark is reached (mark equals zero), the loop terminates o The index of the minimum mark is returned. User Interaction: • Using StudentMain.c, prompt the user to enter student details and display the results. o It will prompt for student Information and print out the average mark, the maximum mark, and the minimum mark. o Keep in mind that a student could be studying up to 6 subjects. Always ensure the integrity of your data and handle edge cases appropriately.
Your program should run as follows: Setup: • Name your program files Student Info.c and Student Info.h. • Make sure the test file StudentMain.c is in the same directory as your program files. Your Student Info.h should contain the following: Structures: • Design and declare the following structures in studentInfo.h: • Subject : Contains members name (char array, array size MAX_STR) and mark (integer). • Student Info : Contains members lastName (char array, array size MAX_STR), studentId (integer), and subject (an array of subject structures, array size NUM_SUBJECTS). Function Prototypes: Declare the following function prototypes in StudentInfo.h: initializeInfo: returns void, accepts the address of struct Studentinfo averageMark: returns float, accepts the address of an array of struct Subject maximumMark: returns integer, accepts the address of an array of struct Subject • minimumMark: returns integer, accepts the address of an array of struct Subject #define MAX_STR 32 #define NUM_SUBJECTS 6 ● Function Definitions: Implement the functions in Student Info.c as described: initializeInfo: returns void, accepts the address of struct Studentinfo o Sets the last name to a null string. This can be accomplished by setting the first character in the last name array to the null terminator '\0'. o Sets the student id to e. ● 9 ● o Goes through the subject array (NUM_SUBJECTS) and for each subject sets name to a null string and sets mark to e. averageMark: Calculates the average mark from the provided subject marks. o Uses a for-next loop to go through all the marks (up to NUM_SUBJECTS). Once an invalid mark is reached (mark equals zero), the loop terminates o Returns the running total divided by the number of marks. maximumMark: Identifies and returns the index of the highest mark. o Uses a for-next loop to go through all the marks (up to NUM_SUBJECTS). Once an invalid mark is reached (mark equals zero), the loop terminates o The index of the maximum mark is returned ● minimumMark: Identifies and returns the index of the lowest mark. o Uses a for-next loop to go through all the marks (up to NUM_SUBJECTS). Once an invalid mark is reached (mark equals zero), the loop terminates o The index of the minimum mark is returned. User Interaction: • Using StudentMain.c, prompt the user to enter student details and display the results. o It will prompt for student Information and print out the average mark, the maximum mark, and the minimum mark. o Keep in mind that a student could be studying up to 6 subjects. Always ensure the integrity of your data and handle edge cases appropriately.
Programming with Microsoft Visual Basic 2017
8th Edition
ISBN:9781337102124
Author:Diane Zak
Publisher:Diane Zak
Chapter8: Arrays
Section: Chapter Questions
Problem 12E
Related questions
Question
100%
Due in C language
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 3 steps
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning