Docsity

C Programming Assignment: Implementing Designed Software Solution, Summaries of Port Engineering

Toggle sidebar
bg1
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
output
Actual output Resul
t
1. Verify that
Student
information
will save
into array if
user enters
valid
information
Input
student ID
and grade
-Enter number
of students: 3
-Student ID 1: 1
-Student grade:
6.5
-Student ID 2: 2
-Student grade:
7.5
-Student ID 3: 3
-Student grade:
5
Student
informatio
n save
into array:
ID[]={1,2,
3}
Grade[]={
6.5,7.5,5}
Student
information
save into
array:
ID[]={1,2,3}
Grade[]={6.5,7
.5,5}
Pass
2. Verify that
“Number of
student
must be
positive
number” is
displayed if
user enters
number of
student
with
negative
number.
-Enter number
of students: -3
Display
error
message
“Number
of student
must be
positive
number”
Display error
message
“Number of
student must
be positive
number”
Pass
3. Verify that
“Student’s
grade is
from 0 to
10. Please,
-Enter number
of students: 3
-Student ID 1: 1
-Student grade:
12
Display
error
message
“Student’s
grade is
Display error
message
“Student’s
grade is from 0
to 10. Please,
Pass
pf3

Partial preview of the text

Download C Programming Assignment: Implementing Designed Software Solution and more Summaries Port Engineering in PDF only on Docsity!

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 output Actual output Resul t
  1. Verify^ that Student information will save into array if user enters valid information Input student ID and grade
  • Enter number of students: 3
  • Student ID 1: 1
  • Student grade:
  • Student ID 2: 2
  • Student grade:
  • Student ID 3: 3
  • Student grade: 5 Student informatio n save into array: ID[]={1,2, 3} Grade[]={ 6.5,7.5,5} Student information save into array: ID[]={1,2,3} Grade[]={6.5, .5,5} Pass
  1. Verify^ that “Number of student must be positive number” is displayed if user enters number of student with negative number.
  • Enter number of students: - Display error message “Number of student must be positive number” Display error message “Number of student must be positive number” Pass
  1. Verify^ that “Student’s grade is from 0 to
  2. Please,
  • Enter number of students: 3
  • Student ID 1: 1
  • Student grade: 12 Display error message “Student’s grade is Display error message “Student’s grade is from 0 to 10. Please, Pass

enter again” is displayed if user enters invalid student’s grade. from 0 to

Please, enter again” enter again”

  1. Verify^ that “Student information will displayed when user choose menu “Print Student ID and grade”. Display student ID and grade

ID[]={1,2,3}

Grade[]={6.5,7. ,5} List of student ID and grade:

  • Student ID 1: 1
  • Student grade:
  • Student ID 2: 2
  • Student grade:
  • Student ID 3: 3
  • Student grade: 5 List of student ID and grade: - Student ID 1: 1 - Student grade: 6. - Student ID 2: 2 - Student grade: 7. - Student ID 3: 3 - Student grade: 5 Pass

….. Find student’s min grade

  1. ……^ 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
  2. Verify that Student information will save into array if user enter valid information Input student ID and grade Pass …….