


















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



















Unit Number and Title Unit 0: IT Fundamental & Procedural Programming Academic Year 2022 Unit Tutor Assignment Title Analysis and Design a solution for procedural programming problem Issue Date Submission Date 22/02/20 22 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 procedural programming M1 Discuss on characteristics and features of procedural programming D 1 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
Qualification BTEC Level 5 HND Diploma in Computing Unit number and title Prog102: Procedural Programming Submission date 22/02/2022 Date Received 1st submission Re-submission Date 27/02/20 22 Date Received 2nd submission Student Name Ly Nguyen Student ID GCS Class GCS1003A Assessor name Le Ngoc Thanh 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 D
Grade: Assessor Signature: Date: Lecturer Signature:
➢ LO1 Understand the principles of procedural programming ➢ LO2 Be able to design procedural programming solutions 2. PROGRAMMING LANGUAGE (P1) ❖ A programming language is a computer language that is used by programmers (developers) to communicate with computers. It is a set of instructions written in any specific language ( C, C++, Java, Python) to perform a specific task. Figure 1: Some popular programing languages (Shutterstock. 2022.)
a) Procedural programming paradigm Figure 2 : Procedural programming paradigm (Hexainclude.com. 2022.) Procedural Programming may be the first programming paradigm learned by a new developer. Fundamentally, procedural code is the one that tells a device how to do a task in logical stages. This paradigm employs a top-down linear approach and regards data and methods as distinct entities. Procedural Programming separates the program into procedures, which are sometimes known as routines or functions and simply comprise a set of actions to be carried out, based on the notion of a procedure call. (Hackr.io. 2022.) b) Key Features of Procedural Programming The key features of procedural programming are given below:
( Hackr.io. 2022. ) d) Conclusion Procedural Programming is more of what you are doing than how you are doing it. It is the standard approach used in many computer languages such as C, Pascal, and BASIC. While there is no perfect programming paradigm, it is important to understand that the correct paradigm will always depend on the type of language you use and the program you wish to create. To get the best results and a strong portfolio, you need to be proficient in both of the three major programming paradigms. (Hackr.io. 2022.) II. PROGRAM DEVELOPMENT
1. REQUIREMENT 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. 2. GOALS The purpose of the report is to support teachers to create a program that can accommodate all their needs. In particular, after completing any options, the program will be return the main screen. So that the user can choose another option. Furthermore, the program will have option to exit. The report is a technical guide to programming in general, with a particular focus on procedural programming. 3. ANALYSIS AND DESIGN (P2, P3) a) Variables and Data Types ➢ Variables Variables are used to store data that will be referenced and altered by a computer program. They also allow us to identify data with descriptive names, making our programs easier to understand for both the reader and ourselves. Variables can be thought of as information-holding containers. They exist just to categorize and store data in memory. This information will subsequently be utilized throughout your program. ( Launchschool.com.
Figure 3: Types of variables (Tutorialspoint.com. 2022. ) ➢ Data Types The data type of a value (or variable in certain instances) is a property that specifies the sort of data the value may contain. Most commonly, the phrase refers to static typing of variables in programming languages such as C/C++, Java, and C#, where the type of a variable is known at compile time. Integers, floating point values, strings, characters, and other storage classes are examples of data types. Data types define particular characteristics of data used in software programs and inform the compilers about predefined attributes required by specific variables or associated data objects. (Techopedia.com. 2022)
Figure 5: Table shows data about variables b) If – else statement function
e) FUNCTION A function is a code module that only does one thing. Sorting, searching for a specific item, and inverting a square matrix are some instances. Once a function is written, it is thoroughly tested. After that, it is added to the function library. (Cpp.edu. 2022. Functions in C++ .) Figure 10: Function example (Programiz.com. 2022. C++ Function) A function declaration tells the compiler about a function's name, return type, and parameters. A function definition provides the actual body of the function. A function is known with various names like a method or a sub-routine or a procedure etc. (Tutorialspoint.com. 2022. C++ Functions .)
III. USE CASE DIAGRAM
❖ Input function : Figure 12: Input
❖ Display option: Figure 13: Display