Docsity

Assignment 1 Prog102, Essays (university) of Software Development

Toggle sidebar
bg1
1
Assignment Brief 1 (RQF)
Higher National Certificate/Diploma in Computing
Unit Number and Title
Unit 0: IT Fundamental & Procedural Programming
Academic Year
2021
Unit Tutor
Hồ Nguyễn Phú Bảo
Assignment Title
Analysis and Design a solution for procedural programming problem
Issue Date
Submission Date
30/06/2021
IV Name & Date
Nguyễn Trí Tài – 15/01/2002
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
procedural programming
M1 Discuss on characteristics
and features of procedural
programming
D1 Critically evaluate the
design of your solution
against the characteristics
and features of procedural
programming.
P2 Identify the program units
and data and file structures
required to implement a given
design
M2 Review the design of a
procedural programming
solution.
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.
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe

Partial preview of the text

Download Assignment 1 Prog102 and more Essays (university) Software Development in PDF only on Docsity!

Assignment Brief 1 (RQF)

Higher National Certificate/Diploma in Computing

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

Academic Year 2021

Unit Tutor Hồ Nguyễn Phú Bảo

Assignment Title Analysis and Design a solution for procedural programming problem

Issue Date

Submission Date 30/06/

IV Name & Date Nguyễn Trí Tài – 15/01/

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

procedural programming

M1 Discuss on characteristics

and features of procedural

programming

D1 Critically evaluate the

design of your solution

against the characteristics

and features of procedural

programming. P2 Identify the program units

and data and file structures

required to implement a given

design

M2 Review the design of a

procedural programming

solution.

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.

Introduction about Procedural Programming

Overview about Procedural Programming

Procedural programming: “is a programming paradigm, derived from imperative

programming,

[1] based on the concept of the procedure call. Procedures (a type of routine

or subroutine) 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.

[2]

Pascal and C were published circa 1970–

1972.” [1]

Figure 1

Characteristics

  • A big program is divided into tiny manageable functions or routines. This eliminates the

duplication of code, thereby enhancing code readability and maintenance.

  • During the global variables, different functions might share data. Therefore, functions are

fully segregated, and we have to declare them in the higher range if we wish to exchange data.

  • Global data may alter functions. Since global data is transmitted from function to function,

global data can be changed in function chains throughout the transformation process.

  • Top-down methodology. As mentioned before, procedural programming follows the top-

down methodology, workflow is going from top to bottom.[2]

Procedural programming advantages:

  • About easy and straightforward coding.
  • There are numerous sections of the program that may be utilized in the codes.
  • A less computer memory is consumed in the programming Paradigm.
  • T he flow of the programs written in the program paradigm is more easily tracked.
  • The programming paradigm is regarded best for general programming to learn and

implement.[2]

Disadvantaged procedural programs:

  • Focusing on functions instead of data.
  • The inclusion of global data is problematic in big programs
  • Using global information is susceptible to errors and may be an impediment for maintaining

and improving.

  • The change of the global data necessitates that those functions be altered by the use of it.
  • Because of global data, it is still difficult to maintain and enhance computer code.
  • The procedural programming paradigm does not model the real-world problem very well

since functions are action-oriented and do not really correspond to the elements of the

problem.[4]

The problem needs conditional statements

  • IF statement: display menu, input information, display statistics. Reason: it has the greatest

anh lowest memory mark

  • General form of Switch statement: see a degree for students, find the highest degree for

students, find the lowest degree for students, enter a fitting programme. I use it to produce a total

number of alternatives

  • Due of the many alternatives available to the users. The structure of selection can go in a

variety of directions. The user for instance has several alternatives and does actions: enter, exit, select

a different option, etc.

Loop statement needed in the problem

We often use the statement in procedural programming to execute the statements

  • For: locate "max" and "min" in the top or lowest grade
  • While: but after verifying... - While. So when you do....while you are incorrect, you may do

it while declaring "Do....while."

  • State why: it helps me to determine the greatest or lowest score. That's why. Comparing max,

min may be compared.

Design:

WBS

Diagram 1: software diagram

Diagram 3: Print IDs ad Grade software

Diagram 4: Show menu operation

Diagram 6: Finding lowest grade

Conclusion

I suppose that, finally, I utilize procedural programming in C and apply algorithms, statements and

loop syntax, which make code-drafted stages easier to think.

References

[1]: Wikipedia, 2021, wikipedia, Procedural ProgrammingAvailable at:

https://en.wikipedia.org/wiki/Procedural_programming (06/2021)

[2]: Tuấn Nguyễn, 2019, Tuan Nguyen’s Blog, Programming paradigms – what is procedural

programming?

Available at: https://www.tuannguyen.tech/2019/05/programming-paradigms-what-is-

proceduralprogramming/ (06/2021)

[3]:Tuấn Nguyễn, 2019, Tuan Nguyen’s Blog, Programming paradigms – what is procedural

programming?

Available at: https://www.tuannguyen.tech/2019/05/programming-paradigms-what-is-

proceduralprogramming/ (06/2021)

[4]: Tuấn Nguyễn, 2019, Tuan Nguyen’s Blog, Programming paradigms – what is procedural

programming?.

Available at: https://www.tuannguyen.tech/2019/05/programming-paradigms-what-is-

proceduralprogramming/ (06/2021)