Assignment 2 Front Sheet: Qualification BTEC Level 5 HND Diploma in Computing
Assignment 2 Front Sheet: Qualification BTEC Level 5 HND Diploma in Computing
Assignment 2 Front Sheet: Qualification BTEC Level 5 HND Diploma in Computing
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
Grading grid
P4 P5 M3 M4 D2
1
TABLE OF FIGURE
Figure 17: Print all student IDs togerther with their grades ......................................................................................................... 13
2
Figure 21: Flowchart If-Else ........................................................................................................................................................... 16
TABLE OF TABLE
3
CHAPTER 1 : SCENARIO INTRODUTION PROBLEM
1. SCENARIO
• A math teacher wants to manage grades of a class. He asks you to help him to write a small application
to do that. He needs to enter student IDs, student’s grades and store these 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.
2. REPORT OBJECTIVE
4
• The main purpose of the essay is to provide a basic explanation of procedural programing. This report
will help teachers to manage student ID and gradesfor all students of the class. In addition, it can help
teachers with many options such asadding more student, search for student informationand find the
highest or lowest grade students in the classroom.
A. MAIN VARIABLES
a. Function inputID
5
Figure 2: InputID
b. Function inputGrade
Figure 3: InputGrade
6
Figure 4 : CheckID
7
Figure 5: ListStudent
8
g. Function find the lowest student.
i. Option of user.
9
Figure 10: Option of user
j. Main of Sceario
10
Figure 12: Main of Scenario
11
C. RESULT OF SCENARIO
a. Main of scenario
12
b. Enter StudenID
c. Enter Grade
Figure 17: Print all student IDs togerther with their grades
13
e. Print studentIDs has highest grades
Stt Test step Test case Expected results True resutls Status
14
1. Choose your option 1 : StudentID 1 : 8.00 StudentID 1 : 8.00 PASS
Print all student IDs StudentID 2 : 9.50 StudentID 2 : 9.50
togerther with their grades StudentID 3 : 7.00 StudentID 3 : 7.00
StudentID 4 : 7.50 StudentID 4 : 7.50
StudentID 5 : 8.00 StudentID 5 : 8.00
2
2. Submit
1. Choose your option 2 : Student ID 2 get 9.50 Student ID 2 gets 9.50 PASS
Print studentIDs has points, the person with points, the person
highest grades the highest grade! with the highest
3 grade!
2. Submit
1. Choose your option 3: Student ID 3 get 7.00 Student ID 3 get 7.00 PASS
4 Print StudentIDs has points, the person with points, the person
lowest grades the lowest grade! with the lowest grade!
1. Enter Student Grade Grade of student : Seven …Program finished with …Program finished PASS
6 exit with exit
Press ENTER to exit Press ENTER to exit
2. Submit console console
3. Submit
15
CHAPTER 3 : SUMMARY
1. EVALUATION
- First, write console and enter sequentially
- Insert into array type int: StudentID.
- Insert into array type float : Grade
For Example :
StudentID 1 2 3 4 5
Grade 6 5 6 9 10
- Requirement 1: print out all student + grade : Then run “for” loop, because the 2 arrays are of equal length. So
each student's index will correspond to the index of grade. As in the example: position 0 (index = 0) will be student
with id = 1 and grade = 3, position 1 (index = 1) will be student with id = 2 and grade = 5.
A. IF-ELSE :
- If else structure is a component that is used in almost every software program
- I use this structure in this scenario because: If the condition is true then it will continue, and if it is false, it will
Break.
- Flowchart example :
16
B. FOR
- For loops have a more complex syntax, but are more concise than while or do-while loops when used.
- For loop can completely replace while loop.
- For loops are often used for situations where the number of workload iterations is known in advance.
- For loop syntax :
C. WHILE
- The while loop is defined by the while keyword. Once the while loop is executed, the while conditional expression
is evaluated. If the conditional expression evaluates to true, the statements in the while loop will be executed.
- For example :
17
3. ANALYZE THE RESULTS FROM TEST CASES
- As you can see, during the test case, some unnecessary errors occurred. That is, instead of
typing numbers to display scores on the screen, I replaced it with words for testing. Example:
We entered the letter Seven instead of the number 7, but the system immediately Exit.
Likewise we tried with entering student ID, and the results were the same (Stt 6, 7 Table 1). In
addition to the above errors, the program runs very smoothly and with the correct process. All
tests achieved the expected results without any errors. In the future we will update new
features suitable for student administrators.
A. PROS
- In my opinion, this program is designed for teachers, it is easy to use, easy to find students,
enter students, or fill in students. It has everything a teacher needs to get the most out of it. I
have designed for the program a really eye-catching menu and easy to use as easy as possible. I
added to the menu specific options such as: EnterStudentID, EnterStudentGrade, Student have
highest grade, lowest grade. For example: If you want to find the student with the highest
score, simply press 2 on the menu to display it (as shown in Figure 18). In summary, This
program can help teachers or those who need to use it as best as possible.
B. CONS
- Everything has pros and cons, although I have done the best I can, there are still some points
that I am still not satisfied, that is I still cannot make the display all the students together. for a
while, and have yet to specifically select a student and display that student's specific scores.
What I regret the most is that I still cannot print out student scores in words. For example: If I
enter the score in words Seven, the system will immediately Exit.
C. BETTERMENT
- In the future, I will update the program with new features such as: Enter the number of
students' scores from low to high or high to low, delete students, add students, and special
Especially, to select students with equal scores.
D. OVERALL EVALUASION
18
- In conclusion, this program is really the program that I did the best I could. Although it may lack the special
features but the current ones that I did, it. can be of help to teachers and student administrators. Although the
program still has many bugs, but in the future I will definitely fix it.
19