You are on page 1of 3

ASSIGNMENT 2 GUIDE

P4, M3 Write a program that implements the designed solution.


- You need to implement the software designed in assignment 1 using C
programming language.
- Your code must make use of programming standards, including file headers and
effective code commenting, variable name should be meaningful and
descriptive. Input data are validated.
- Explain how functions are used in your program
- You need to provide screenshots of your program when running.
- During the development of your program, if you make any changes to the
original design, state them with reasons in report.
- Your code listings must be included as an appendix.

P5 Test the program with proper test plan.


Test Plan
- Creator: Nguyen Van A
- Create Date:….

No. Test case Function Input Data Expected Actual output Result
output
1. Verify that Input - Enter number Student Student Pass
Student student ID of students: 3 informatio information
information and grade - Student ID 1: 1 n save into save into array:
will save into - Student grade: array: ID[]={1,2,3}
array if user 6.5 ID[]={1,2,3} Grade[]={6.5,7.5,
enters valid - Student ID 2: 2 Grade[]={6. 5}
information 5,7.5,5}
- Student grade:
7.5
- Student ID 3: 3
- Student grade:
5
2. Verify that - Enter number Display Display error Pass
“Number of of students: -3 error message
student message “Number of
must be “Number student must be
positive of student positive
number” is must be number”
displayed if positive
user enters number”
number of
student with
negative
number.
3. Verify that - Enter number Display Display error Pass
“Student’s of students: 3 error message
grade is - Student ID 1: 1 message “Student’s grade
from 0 to 10. - Student grade: “Student’s is from 0 to 10.
Please, enter 12 grade is Please, enter
again” is from 0 to again”
displayed if 10. Please,
user enters enter
invalid again”
student’s
grade .
4. Verify that Display ID[]={1,2,3} List of List of student Pass
“Student student ID Grade[]={6.5,7.5,5} student ID ID and grade:
information and grade and grade:
will - Student - Student ID 1:
displayed ID 1: 1 1
when user - Student - Student
choose grade: grade: 6.5
menu “Print 6.5 - Student ID 2:
Student ID - Student 2
and grade”. ID 2: 2 - Student
- Student grade: 7.5
grade: - Student ID 3:
7.5 3
- Student - Student
ID 3: 3 grade: 5
- Student
grade: 5
5. Find
….. student’s
min grade

6. …… Find
student’s
max grade

M4 Analyse test results for future maintenance


Test results (passed or failed) should be analysed to help the program in future
maintenance.

No. Test case Function Result Evaluation


1. Verify that Student Input student ID Pass …….
information will and grade
save into array if
user enter valid
information
2.
3.
4.

D2 Evaluate your program, state lessons learnt and future


improvements.

Write an evaluation and conclusion of the whole development. The evaluation of your
program should be based on its running and its test result. You should mention about
lessons learnt and future improvement.

You might also like