Download as pdf or txt
Download as pdf or txt
You are on page 1of 15

Higher Nationals in Computing

Unit 0: Procedural Programming


ASSIGNMENT 2

Learner’s name: Nguyễn Xuân Nam


ID: GCS200708
Class: GCS0905A
Subject code: PROG102
Assessor name: PHAN MINH TAM

Assignment due: Assignment submitted:


ASSIGNMENT 2 FRONT SHEET

Qualification BTEC Level 5 HND Diploma in Computing

Unit number and title Unit 0: IT Fundamental & Procedural Programming

Submission date 23/8/2021 Date Received 1st submission

Re-submission Date 25/8/2021 Date Received 2nd submission

Student Name Nguyễn Xuân Nam Student ID GCS200708

Class GCS0905A Assessor name Phan Minh Tam

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
 Summative Feedback:  Resubmission Feedback:

Grade: Assessor Signature: Date:

Signature & Date:


ASSIGNMENT 2 BRIEF

Unit Number and Title Unit 0: IT Fundamental & Procedural Programming


Academic Year 2021
Unit Tutor
Assignment Title Assignment 2: Write a program and test
Issue Date
Submission Date
IV Name & Date

Learning Outcomes and Assessment Criteria

Pass Merit Distinction

LO3 Be able to implement procedural programming solutions


LO4 Be able to test procedural programming solutions

P4 Write a program that M3 Program is written following D2 Evaluate your program,


implements the designed coding standards, input data are state lessons learnt and future
solution. validated improvements.

P5 Test the program with proper M4 Analyse test results for future
test plan. maintenance.
Assignment Brief
Scenario: Please refer to scenario in Assignment 1.
Tasks 1
Your next task is to implement the software that you designed in previous steps. 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. 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.
Task 2
Test your program by making a test plan, execute it and log results. Your test plan should include data
validation and program operations based on requirements. Test results (passed or failed) should be analysed
to help the program in future maintenance.
Task 3
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.
A final report of these 3 tasks must be submitted in PDF format to CMS.

Submission Format
The submission is in the form of a Word document. You are required to make use of appropriate structure,
including headings, paragraphs, subsections and illustrations as appropriate, and all work must be supported
with research and referenced using the Harvard referencing system.
Table of Contents
P4 Write a program that implements the designed solution ....................... 1
1. Application source code ..................................................................................... 1
2. Application screenshots ......................................................................................3
2.1. Main screen ..................................................................................................... 3
2.2. Function 1 in menu: Input ID(s) and Grade(s) .................................................. 4
2.3. Function 2 in menu: Show ID(s) and Grade(s) .................................................. 4
2.4. Function 3 in menu: Show highest Grade(s) .................................................... 4
2.5. Function 4 in menu: Show lowest Grade(s) ..................................................... 5
2.6. Function 5 in menu: Exit application ................................................................ 5

P5 Test the program with proper test plan ................................................6


ASSIGNMENT 2 ANSWERS
P4. Write a program that implements the designed solution
1. Application source code.

Page |1
Page |2
2. Application screenshots.
2.1. Main screen.
Page |3
2.2. Function 1 in menu: Input ID(s) and Grade(s).

2.3. Function 2 in menu: Show IDs and Grades.

2.4. Function 3 in menu: Show highest Grade(s).

Page |4
2.5. Function 4 in menu: Show lowest Grade(s).

2.6. Function 5 in menu: Exit application.

Page |5
P5. Test the program with proper test plan
Implement the test plan for your software.
Test plan template:

Test What is being tested Expected outcome Actual outcome Pass


number or
Fail
1 Select number 1 from Display screen to allow Ask the user to enter how Pass
menu how many students do many students.
you want to add.
2 Select number 1 from Display screen to allow Ask users input the Pass
menu input ID and Grade student(s) ID(s) and
Grade(s)
3 Select number 2 from Display screen ID and All student IDs and Pass
menu Grade of all students in Grades in the array are
array already displayed on
the screen
4 Select number 3 from Display the id with Grade The Id with Grade Pass
menu highest score in the array highest were displayed
on the screen
5 Select number 4 from Display the id with Grade The Id with Grade Pass
menu lowest score in the array lowest were displayed
on the screen
6 Select number 5 from Exit the program The program has been Pass
menu exited.
7 Input there are 3 Display screen to allow Ask users input the Pass
students in the class Input ID(s) and Grade(s) students ID(s) and
of 3 students Grade(s) of 3 students
8 Input student 1 ID = 1 Save IDs and Grades of 2 Student 1 ID = 1 Pass
Input student 1 Grade students in array Student 1 Grade =
= 2.00 2.00
Input student 2 ID = 2 Student 2 ID = 2
Input student 2 Grade Student 2 Grade =
= 8.00 8.00 were saved into
array
9 Select number 1 from Display screen to allow Ask user Input the Pass
menu to add 1 more Input ID and Grade of student ID and Grade
student student
10 Input student 3 ID = 3 Save the ID and Grade of Student 3 ID = 3 Pass
Input student 3 Grade the 3rd student in the Student 3 Grade = 5.00
= 5.00 old array were saved in to old array

Page |6
11 Input student 4 ID = a Save the ID and Grade of Student 4 ID = a Pass
Input student 4 Grade the 4rd student in the Student 4 Grade =
= 6.00 old 6.00 were saved in to
arra old array
12 Add a student 5 with Save ID and Grade of The informations were pass
the same highest student in array saved in to array
Grade but different ID
13 Add 1 more student Save ID and Grade of The informations were Pass
with Grade higher student in array saved in to array
than the highest
grade
2 students
14 Add a student 6 with Save ID and Grade of The informations were Pass
the same lowest student in array saved in to array
Grade
but different ID
15 Add 1 more student Save ID and Grade of The informations were Pass
with Grade less than student in array saved in to array
the lowest grade 2
students
16 If the select number is Display the message The program was Pass
different from 1 to 5 “Your selection is not displayed “Your selection is
correct! Please try not correct! Please try
again!” again!”
17 Select number 4 from Show the student with Student with lowest Pass
menu Grade less than 6 Grade less than 6
students students at test number
at test number 15 15 were displayed on
the screen
18 Select number 3 from Show the student with Student with highest Pass
menu Grade higher than 5 Grade less than 5
students at test number students at test number
13 13 were displayed on
the screen
19 Select number 1 from Display screen to allow Ask user Input the Pass
menu to add 1 more Input ID and Grade of student ID and Grade
student student
20 Add 1 more student Save ID and Grade of The informations were Pass
with Grade less than student in array saved in to array
the lowest grade 2
students

Page |7
Page |8
REFERENCES

 Kernighan, B. and Ritchie, D. (1988). The C Programming Language. United States, Hoboken:
Prentice Hall.

 Levy, Stephen(9 June 2021) https://en.wikipedia.org/wiki/Low-level_programming_language


[Accessed 8 August. 2021]

 From Wikipedia(18 July 2021) https://en.wikipedia.org/wiki/High-level_programming_language


[Accessed 8 August. 2021]

 Sagar Bhatia(8 Jan. 2021) https://hackr.io/blog/procedural-programming [Accessed 8 August.


2021]

 From tutorialspoint. C – Variables https://www.tutorialspoint.com/cprogramming/c_variables.htm


[Accessed 8 August. 2021]

 From tutorialspoint. C – Data types


https://www.tutorialspoint.com/computer_programming/computer_programming_data_types.ht
m [Accessed 8 August. 2021]

 Yingzi Li(2019) https://www.quora.com/What-is-the-major-characteristic-of-procedural-


programming [Accessed 8 August. 2021]

Page |9

You might also like