You are on page 1of 9

Higher Nationals in Computing

Procedural Programming

ASSIGNMENT

No.1

Learner’s Name: NGO HOANG LUYEN

Assessor Name: NGUYEN VAN SON

Class: GCS0903
ID: 000757
Assignment due:
Assignment submitted:

ASSIGNMENT 1 FRONT SHEET


Qualification BTEC Level 5 HND Diploma in Computing
Unit number and
Unit 0: Procedural Programming
title

Submission date Date Received 1st submission

Re-submission Date Date Received 2nd submission

Student Name Student ID

Class Assessor name

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
P1 P2 P3 M1 M2 D1

❒ Summative Feedback: ❒ Resubmission


Feedback:

Grade: Assessor Signature: Date:


Lecturer Signature:

ASSIGNMENT 1 BRIEF
Unit Number and Title Unit 0: Procedural Programming
Academic Year 2021
Unit Tutor
Assignment Title Assignment 1: Analysis and Design a solution for procedural
programming problem
Issue Date
Submission Date
IV Name & Date

Learning Outcomes and Assessment Criteria

Pass Merit Distinction

LO1 Understand the principles of procedural programming


LO2 Be able to design procedural programming solutions

P1 Provide an introduction to M1 Discuss on characteristics D1 Critically evaluate the


procedural programming and features of procedural design of your solution
programming against the
characteristics and
P2 Identify the program units M2 Review the design of a features of procedural
and data and file structures procedural programming programming.
required to implement a solution.
given design

P3. Design a procedural


programming solution for a
given problem

Assignment Brief
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.
Task 1
To prove your programming ability to be appointed to this small project, please prepare an
illustrated guide on programming in general and a particular emphasis on procedural
programming. Here you will need to include introduction to computer programming languages
and discuss key features of procedural programming.
Task 2
Your next task is to do the analysis for the scenario mentioned above by doing the following
subtasks
 Identify the variables and data types required in the program.
 Identify and describe 2 different selection structures, including the condition(s) to check;
state why they are needed and where they can be used in the context of the scenario.
 Identify and describe any iteration constructs.
 Split the program into functions (sub-functions) and draw a hierarchy diagram to illustrate
the structure of your program.

Task 3
You need to use a drawing tool to draw design diagram for your program, includes:
 A use case diagram for actions required
 Flow chart diagrams for: menu operation, printing IDs and grades, finding max grade and
finding min grade.
 Review / evaluate your design, state clearly pros vs cons and which needs to improve,
using characteristics of procedural programming as bases to discuss.

Write a report for 3 tasks above and submit the report to CMS in PDF format.

Submission Format
The submission is in the form of an individual written report. This should be written in a concise,
formal business style using single spacing and font size 12. You are required to make use of
headings, paragraphs and subsections as appropriate, and all work must be supported with
research and referenced using the Harvard referencing system. Please also provide a bibliography
using the Harvard referencing system.
1. Introduction to procedural programming (P1)
 Computer Programming is an art of making a computer to do the required
operations, by means of issuing sequence of commands to it. A programming
language can be defined as a vocabulary and set of grammatical rules for instructing
the computer to perform specific tasks. Each programming language has a unique
set of characters, keywords and the syntax for organizing programming
instructions. The term programming languages usually refers to high-level
languages, such as BASIC, C, C++, COBOL, FORTRAN, Ada, and Pascal.
1(Teaneck, 2007)
Introduction about procedural programming:
Procedural programming is a programming paradigm, derived from structured
programming, based on the concept of the procedure call. Procedures, also known as
routines, subroutines, or functions, simply contain a series of computational steps to be
carried out. Any given procedure might be called at any point during a program's
execution, including by other procedures or itself. The first major procedural
programming languages appeared circa 1957–1964, including Fortran, ALGOL,
COBOL, PL/I and BASIC. Pascal and C were published circa 1970–1972.
Computer processors provide hardware support for procedural programming through
a stack register and instructions for calling procedures and returning from them.
Hardware support for other types of programming is possible, but no attempt was
commercially successful (for example Lisp machines or Java processors).
Discuss on characteristics and features of procedural programming.
Procedural programming characteristics:
-While designing a program, POP follows a top-down programming approach.  Most
functions allow system-wide data to be shared.
-It also divides larger programs into smaller pieces called functions.  It allows the free
movement of data around the system.
-Data is converted by functions from one form to another.
Features of procedural programming: Provides the ability to reuse the same code in
many different places.
-Facilitates program flow monitoring.

2. Capable of building modulesThe analysis for the program (P2)


2.1 Variables and data types required in the program.
Variable Data Type Describe
Min Float This variable is used to
store
the point with the
smallest
parameters in the
array
Max Float This variable is used to
store
the score with the
largest
parameters in the
array
G[] Float This is the array used to
store students' grades
and
is declared by float,
student
scores are also possible
decimal.
ID[] integer This is the array used to
store students and
declarations
with the integer data
type. In
which it is determined
in
order
The students in the
array
were entered previously
by
teacher.

2.2 Selection structures in the program (if, else, switch...)


a) If Statement.
o The if statement, allows us to establish decision-making in the programs.
Programs may require certain logical tests to be carried out at some
particular points.
o The tests and subsequent decisions are made by evaluating a given
expression as either
True (non zero) or False (zero).
An expression involves arithmetic, relational, and/or logical operators.
o Depending on the result of the expression the statements are executed.
Syntax of if statement:
if (expression)
{ Statements1; }
[ else { Statements2; } ]
Statements3;
[ CITATION Cog07 \l 1033 ] b) Iteration statements.
o Most of the real world applications require some set of instructions to
perform repetitive actions on a stream of data.
o There are several ways to execute loops in C.
o The statements used for looping are: ‘for’, ‘while’, ‘do- while’. o This
statement is used to repeat a statement or a set of statements for a specified
number of times or until a condition satisfied. Syntax of for loop:
For (expression1; expression2; expression3)
{ Statements/ block of statements; }

2.3 Iteration constructs in the program (for, while, do... while)


2.4 Split the program into functions (sub-functions) and draw a hierarchy
diagram
2.5 Testing and Debugging
2.6 Maintenance
2.7
3. Design diagrams for the program (P3)
3.1. Use-case diagram
3.2. Flowcharts
- Menu operation,

4. Characteristics and features of procedural programming (M1)


Description
In computer science procedural programming language specifies a sequence
of well structured procedures and steps in its programming context to build a
program. In addition this programming language includes the functions,
commands and order of statements to complete program and computational
tasks.  In programming language procedural programming language is
identified as an imperative language. Procedural programming as the name
realizes, implies on well organized and predefined procedures, sub routines
and functions in program’s architecture by specifying all the sequences that
the computer must reach as a desired outputs or state. Procedural
programming language segregates a program within statements, functions,
variables and conditional operators. In programming language procedural
programming language is most common language includes Pascal, C and
coldFusion, C#(Watt and Findlay, 2004).

Characteristics and features of procedural programming language 

Procedural programming language helps the developer or programmer to


build large application programs in effective manner with the help of divided
into smaller program also known as functions. In addition in procedural
programming language most of the functions are to be shared in global data
that helps the developer to move data and instructions openly within the
system from one function to other functions.  In addition to build an effective
programming language developer implements the top down approach i.e.
programming paradigm. In addition procedural programming helps the
programmer in order to break down application program into a data structure,
variables and subroutine(Kochan, 2005).  Procedural programming languages
or code of instruction are executed very fast and required less memory.
Moreover, procedural programming language allows developer to develop
general purpose programming and offers better level of controls as well as
portable source code. Thus it is said that procedural programming involves
that it can be used to evaluate and analyze all distinguish areas of life and
provides better solutions of complex program.

5. Referrences

You might also like