


















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
The structure and functions of a student information management program in C language. It includes the use of standard library functions, C functions, and algorithms to input, view, and find highest and lowest grades. The document also covers coding standards and examples of program results.
Typology: Assignments
1 / 26
This page cannot be seen from the preview
Don't miss anything!



















Qualification BTEC Level 5 HND Diploma in Computing Unit number and title PROG102: Procedural Programming Submission date 12 nd^ of November 2021 Date Received 1st submission Re-submission Date Date Received 2nd submission Student Name Tran Anh Tuan Student ID GCD Class GED1001 Assessor name Phan Thanh Tra Student declaration I certify that the assignment submission is entirely my own work and I fully understand the consequences of plagiarism. I understand that making a false declaration is a form of malpractice. Student’s signature Tuan Grading grid P 4 P 5 M3 M4 D
Summative Feedback: Resubmission Feedback: Grade: Assessor Signature: Date: Lecturer Signature:
A math teacher wants to handle class scores. He asks for your assistance in preparing a small application. He must enter student IDs, student’s grades and store this information on two separate arrays (integer array for IDs and float array for grades). Next, he has to print all the student ID with their grade. Finally, he must know which student has the highest grade and the lowest grade. Your program would have to be menu based on the above options. When an option is completed, the program must return to the main menu so he can choose a different option. There ought to be an option to shut down the program.
I spell out 5 functions that are used to manage student information: ❖ Input student’s IDs, student’s grades ❖ Display student information ❖ Finding highest grade ❖ Finding lowest grade ❖ Exit
Library function: In the program, I will use 2 types of C standard library functions, which are: ➢ #include <stdio.h> : stands for Standard Input-Output. It contains information on input and output functions. ➢ #include <stdlib.h>: stands for Standard Library. It contains data on memory allocation and freeing functions. ➢ #define is a function that allows naming an integer or a constant real number. When compiling will replace the constants you are using with their key values. This replacement is called pre-compile.
Figure 3. C functions Figure 4. C functions
Figure 5. C Function
Figure 7 .Executable part
5.1. “Enter student information” function:
of 0 to 10, the user must input the student's score accurately. When a user submits an incorrect grade, the system returns "invalid" and returns to the previous re-entry of the grade. ➢ When all conditions are satisfied, the program will print the score and ID Figure 8. “Enter student information” function 5.2. “View student information” function:
Figure 10. “View highest student grade” function 5.4. “View lowest student grade” function:
Figure 11. “View lowest student grade” 5.5. “View menu” function:
condition and returns an error stating that the user entered it incorrectly. Figure 13. Switch case
Coding standards is a set of rules that regulate how to write the code of a program that programmers must follow when participating in a project to develop that program. There are different standards for each project. A set of rules has many types and the types we often encounter are the rules for naming variables, constants, functions, classes, ... or declare and use variables. Standards compliance helps us know what we're doing, and what's happening with lines of
code. It should be easy to find and correct mistakes. ➢ Naming conventions for etc: In the program, I use standard Camelcase writing. It is a naming convention for writing file or object names that contain at least one compound word or concatenation that begins with a capital letter. It is often used to name files and functions without violating the naming rules of the underlying language. It is useful in programming because element names cannot contain spaces. In the program, I also use PascalCase writing style for components in C, for example, menus,... Figure 14. CamelCase naming style in C As for the UPPER_CASE type, we often use them in the case of constants, which need to be used for many purposes in the code.
start, the system will show you all 5 function options and we will use one of these to start the function. Example: When you select option 2, you will get a list of all student IDs and grades. Figure 17. Result of menu function When the user selects option 1, a message prompting the user to input a few
students appears on the screen. Display user-selected options and statements for entering student information. Figure 18. Result of option 1