












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
A front sheet for an assignment in Procedural Programming for a BTEC Level 5 HND Diploma in Computing. It includes the submission and re-submission dates, student name and ID, class information, and assessor name. The assignment involves writing functions for total students, finding the highest and lowest grades, and displaying student information. The document also includes sample test cases.
Typology: Assignments
1 / 20
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 13/11/2021^ Date Received 1st submission Re-submission Date^15 /11/2021^ Date Received 2nd submission Student Name Le Duy Long Student ID GCD201 508 Class GCD 1001 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 Long Grading grid P4 P5 M3 M4 D
r Summative Feedback: r Resubmission Feedback: Grade: Assessor Signature: Date: Lecturer Signature:
1.C program 1.Coding standard: Camel Case In this program:
In this funtion, I made the users enter the total of studentstthat they want to store and display the information of students. Basically, it just enter the number off total student. Then, they will check whether itt is the number or not. If it is the char, the go into the while loop to force the users enter the iput again to fit the criteria. Finally, the funtion will return type integer number. d.Information. Figure 4 :Information This funtion let user enter the ID and the grades of students (for loop to make the array from the initial box to last box. Once the user entered, the infromation will be stored.Moreover, I validate the ID which cannot the same with the prevvios ID user entered. In order to checking an ID is available or not in the list, I used for loop to compare each ID with the ID is checked in the list. If that ID is available,
program will loop again. Also, Input data of grade are validated: when a user input student’s grade that the negative number and grater than 10. The user must re-enter a new grade to match the condition. e. Display the Information of Student Figure 5 :Displaying a list of student The fucntion will show the information by three features: ordianl numbers, IDs, grades by for loop in the array of ID, grade. From 1 to the total number of students, user can view all information of students at the same time when the fucntion executes.
To find out the student have highest score, first, create and assign variable max, which means that first student has highest grade then it is used to compare each grade in list of students from first student to end by for loop. If grade is bigger than previous grades, that grade is declared into max. g.Function program: Finding the lowest grade in list Figure 7 :The lowest grade To find out the student have lowest score, first, create and assign variable min, which means that first student has lowest grade then it is used to compare each grade in list of students from first student to end by for loop. If grade is small than previous grades, that grade is declared into min. 2.Main program In main, I firstly declare the variable of sID, sGrade and userchoice. I used the switch-case statement is used to act your choice, and within the while loop to countinue if user can choose another option until different zero. If your choice is 1, entering list of student function is active, it is like other choices. Main is also part where all of functions will carry out.
Figure 8 :Main function
Figure 11 :Enter ID and Grade All information will be saved in a list array by the system. The system will offer the next menu once each task is completed. Following that, we press 2 to bring up a dispaly information of students. Figure 12 :Present list of student
Then, press number 3 to find the highest grade in class. Otherwise, press 4 to look for the lowest grade. Figure 13 :Finding the highest grade Figure 15 :Finding the lowest grade Figure 14 :End the program
Figure 18 :Enter wrong type of grade Another example is when a user inputs an ID that already exists. I construct a function in the application that checks whether the entered ID already exists in the list. The user must re-enter a new ID if it is already in the list. Figure 19 :Enter ID already exist
II. Testing data case 1.Test schedule Test case Start date End date Estimated effort (Hrs./Days) Notes TC1 10 / 11 / 1
2.Testing and result.
TC 05 - Input choice 2
Re-enter required Passed TC 06 - Input choice 2
McKenzie, C., 2021. Pascal case vs. Camel Case: What's the difference? TheServerSide.com. Available at: https://www.theserverside.com/answer/Pascal-case-vs-camel-case-Whats-the-difference [Accessed November 12, 2021].