










Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!











ļ² Summative Feedback: ļ² Resubmission Feedback:
Figure 3: Display Menu
Figure 4:Selection an
option..................................................................................................
Figure 5:
Main.....................................................................................................................
Figure 6: Input student information
Figure 7: Display list of student
Figure 8: Display a student has highest grade with Id
Figure 9: Display a student has lowest grade with Id
Figure 10: Menu
Figure 11: Enter IDs and grades of all students in class
Figure 12: Print out name and grade of students
Figure 13: Find the student has highest grade
Figure 14: Find the student has lowest grade
Figure 15: Exit the program
I. Implementaion (P4,M3)
A.Scenario:
A math teacher wants to manage grades of a class. He asks me to help him to
write a small application to do that. He needs to enter student IDs, studentās
grades and store this information into 2 separate arrays (integer array for IDs
and float array for grades). Then he needs to print all student IDs together with
their grades. Finally, he needs to know which student has highest grade and
lowest grade. Your program should be menu based with the options above.
When an option is done, the program should go back to the main menu so he
can choose another option. There should be an option to quit program.
B Solve a problem There are 5 Function to assess the learning situation of
students in the last semester:
*Print all student information.
Find the students have highest grade with ID.
Find the students have lowest grade with ID.
Exit
C. Explain:
Figure 1:Library declaration
*I created a menu display function using printf() function to create options for
the user to use
*I use the switch function to split the selections into 5 sections, each with its
own task.
*I first let the user choose the function by having the user change the numeric
value of the selection()variable.
Figure 4:Selection an option
*Then let the switch function change the functions when the selection()
variable changes.
Figure 5: Main
Figure 6: Input student information
*In the loop, I let the user enter the student id,āi+1ā is used so that the program
start to print the 1ststudent instead of the 0th student, then I continue to create a
new loop with j variable and Id[j] to check if the input id exists in the Id[100]
array or not. If not, the program will continue to run to the next statement.
*After the id input is passed, I continue to create a loop to enter the student's
grades p1[50] array,. If the condition is passed, the Input() function has
completed the task.
6.Display list of student:
Figure 7: Display list of student
I create the for loop with printf() function to repeat printing out One by one
value of 2 arrays Id and grades until the loop equal to the number of students
that the user entered before in function 1(Input()).
Figure 9: Display a student has lowest grade with Id
*Same way to create array, n value to create loop and same strategy to find the
maximum value, only difference is the statement of conditional statement.
Make min variable instead of max ,make it zero, put in conditional statement
with condition if min variable value in grades[] array is greater than other value
in same array then min will equal it and also get its id in the Id[]array.
D.Program results:
1.Menu:
options from a menu.
Figure 10: Menu
Figure 11: Enter IDs and grades of all students in class
3.Print out name, grade , name, gioitinh of students:
just entered.
Figure 12: Print out name ,id, grade, gioitinh of students.
I will check the navigation of the program and all the functions.
Test plan:
Test number
What is being tested Expected outcome Actual Outcome Pass or Fail
1 Select number 1 from menu.
How many students do you wish to add? is displayed on the screen.
Ask the user to enter how many student.
Pass
2 Select number 1 from menu.
Display screen with input fields for name, ID, sex, and grade
Ask users input the student(s) id(s), name, sex, and grade.
Pass
3 Select number 2 from menu.
displays the student's name, grade, sex, and gender from the array.
All student sbd, grades, sex, and name in the array are already displayed on the screen.
Pass
4 Select number 3 from menu.
Show the ID in the array with the highest score.
The id with the highest score is displayed on the screen.
Pass
5 Select number 4 from menu.
Display the id with lowest score in the array.
The id with the lowest score is displayed on the screen.
Pass
6 Select number 0 from menu.
Exit the program. The program has been exit.
Pass
7 Input there are 3 students in the class.
Display screen to allow input ID(s), name, sex, and grade(s).
Ask user input the students ID(s), name, sex, and grade(s).
Pass
8 Input student 1 ID = 1 Input student 1 Grade = 5. Input student 1 name :Nguyen Van quang Input student 1 sex: nam Input student 2 ID = 2 Input student 2 Grade = 8. Input student 2 name: Tran Van Tuong Input student sex: Name.
Saved ID and Grade of 2 students in array.
Input student 1 ID = 1 Input student 1 Grade =
Input student 1 name :Nguyen Van quang Input student 1 sex: nam Input student 2 ID = 2 Input student 2 Grade = 8.00 has been saved to the array. Input student 2 name: Tran Van Tuong Input student sex: Name.
Pass
into its fundamental parts, detailing each line and function in great detail. I also had the ability
to write test logs and frequently tested functions, found bugs, and fixed them. Making a
general assessment and identifying the limitations of programs and functions can be leveraged
to come up with ideas for and record developed and future-oriented functions. In future
undertakings, use the knowledge you receive from the program's experience and teachings.
The advantages and disadvantages of procedural programming for this student management
application, as well as the difficulties you encountered when creating the program, should be
discussed.
the first program.
Powered by TCPDF (www.tcpdf.org)