Tải bản đầy đủ (.pdf) (26 trang)

HUYNH TRAN ANH KHOA GCS200252 procedural programming (2)

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (636.43 KB, 26 trang )

Assignment Brief 2 (RQF)
Higher National Certificate/Diploma in Computing
Unit Number and Title
Academic Year
Unit Tutor
Assignment Title

Procedural Programming
2021
Analysis and Design a solution for procedural programming
problem

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
implements the designed
solution.

M3 Program is written following
coding standards, input data are


validated

D2 Evaluate your program, state
lessons learnt and future
improvements.


P5 Test the program with
proper test plan.

M4 Analyse test results for future
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. Also evaluate how procedural programming is
applied in your program, state benefits, disadvantages or difficulties.
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
Assignment Brief 2 (RQF) ......................................................................................................................................................................................... 1
Higher National Certificate/Diploma in Computing ............................................................................................................................................... 1
P4. Write a program that implements the designed solution. .................................................................................................................................. 5
1) Problem ............................................................................................................................................................................................................. 5
Thomas is a Math teacher, he wants to assess the learning situation of students in the last semester. He asks me to help him to create a
score viewer app for him and all student’s parents. He needs to enter student IDs, full names of all students, student’s score and store this
information into 2 separate arrays, integer array(IDs) and float array(grades). After that, he needs to print all student IDs together with their
grades. My program should have a menu base on the option above so that parents can easily access their child's grades. Finally, he
needs to find which student has the highest score and lowest. The student with the highest score will receive an extremely valuable prize
and will be recruited into the team of good students in chemistry. The student with the lowest score is required to take chemistry tutoring
and is punished for community service ................................................................................................................................................................. 5
2) Solve a problem ................................................................................................................................................................................................ 5
3) Code .................................................................................................................................................................................................................. 7
A) Variable .......................................................................................................................................................................................................... 7
B) Display Menu ................................................................................................................................................................................................. 9
C) Input Student’s Information and Display All Student .................................................................................................................................. 11
D) Display All Students And Show Highest Score .......................................................................................................................................... 13

E) Show Lowest Score, Back To Menu and Display student’s information ................................................................................................... 15
F) Display Student’s Score and Find Highest Score ....................................................................................................................................... 17
G) Find Lowest Score and Check whether there is no student or IsNoStudent ............................................................................................ 19
4) Program results ............................................................................................................................................................................................... 21
P5. Test the program with proper test plan. ........................................................................................................................................................... 25


Typical data (1,2, 3...) ...................................................................................................................................................................................... 25

P4. Write a program that implements the designed solution.
1) Problem
Thomas is a Math teacher, he wants to assess the learning situation of students in the last semester. He
asks me to help him to create a score viewer app for him and all student’s parents. He needs to enter
student IDs, full names of all students, student’s score and store this information into 2 separate arrays,
integer array(IDs) and float array(grades). After that, he needs to print all student IDs together with
their grades. My program should have a menu base on the option above so that parents can easily
access their child's grades. Finally, he needs to find which student has the highest score and lowest. The
student with the highest score will receive an extremely valuable prize and will be recruited into the
team of good students in chemistry. The student with the lowest score is required to take chemistry
tutoring and is punished for community service

2) Solve a problem
There are 5 Function to assess the learning situation of students in the last semester
• Input student IDs and their grades
• Display student information
• Find the highest score


• Find the lowest score
• Exit



3) Code
A) Variable



B) Display Menu



C) Input Student’s Information and Display All Student



D) Display All Students And Show Highest Score



E) Show Lowest Score, Back To Menu and Display student’s information



F) Display Student’s Score and Find Highest Score



G) Find Lowest Score and Check whether there is no student or IsNoStudent




4) Program results

Screenshot menu options


Screenshot input information


Screenshot display all information.

Screenshot finding lowest grade.


Screenshot finding highest grade.

Screenshot exit program


P5. Test the program with proper test plan.
What is being
test

Choice options

Input the
number of
students

Input the student

IDs

Data

Result

Symbols or words (a,
b…)

Error

Decimal (1.2,1. 1…)

Accepted

Typical data (1,2, 3...)

Accepted

Statement

Error

Symbols or words (a,
b…)

Error

Decimal (1.2,1. 1…)


Accepted

Typical data (1,2, 3...)

Accepted

Statement

Error

Symbols or words (a,
b…)

Accepted

Decimal (1.2,1. 1…)

Accepted

Typical data (1,2, 3...)

Accepted


×