1. Trang chủ
  2. » Luận Văn - Báo Cáo

PRO102 A1 DISTINCTION FPT

56 8 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

1 | P a g e ASSIGNMENT 1 FRONT SHEET Qualification BTEC Level 5 HND Diploma in Computing Unit number and title Prog102 Procedural Programming Submission date Date Received 1st submission Re submission.

ASSIGNMENT FRONT SHEET Qualification BTEC Level HND Diploma in Computing Unit number and title Prog102: Procedural Programming Submission date Date Received 1st submission Re-submission Date Date Received 2nd submission Student Name Tran Duc Long Student ID GCH210562 Class GCH1106 Assessor name Dinh Duc Manh 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 Long Grading grid P1 1|Page P2 P3 M1 M2 D1 ❒ Summative Feedback: ❒ Resubmission Feedback: 2.1 Grade: Lecturer Signature: 2|Page Assessor Signature: Date: Table of Contents A- INTRODUCTION B- TASK I Programming Language What is Programming Language Definition Features of Programming Language Compile Interpreter Types of programming language II Procedural Programming 10 What is Procedural Programming 10 Definition 10 Functions 10 Key Features of Procedural Programming 11 Code examples .13 Comparing with Object Oriented Programming(OOP) 15 Problem statement 15 a Business Problem: .15 b Discuss: 16 C-TASK 18 I Identify the Variables in the program .18 Variables and Declare the Variable 18 a Variables: 18 b.Variable Declaration: 18 Conclude 19 II Identify and Describe Selection Structure 21 What is the Selection 21 Function 21 “if else” statement 21 “if else” ladder .22 Switch case statement 24 Conclusion 26 III Identify and describe loop structs .26 3|Page loop: for 26 loop: do…while 27 Loop While 29 Conclusion .31 C-TASK 3: 31 I WBS: .31 II A use case diagram for actions required .35 III Flowchart 37 Program main: 37 UserLogin: 39 Check character is number or letter: .41 integer and float check 43 Enter information student: 44 Add a new student and arrange student’s id in ascending order: 45 Search ID and Grade: 47 Find students with the highest or lowest score: 48 Show student’s list: 51 D-TASK 4: 51 Evaluation: .51 Choice menu .52 Show id and grade, and max 52 E-Conclusion: .52 Quote: 52 4|Page A- INTRODUCTION ● We are living in the 4.0 era Thus, there is a lot of innovation happening every day, particularly in technology When it comes to technology, we undoubtedly consider laptops or phones that have improved our lives Procedural programming and programming languages also play significant roles in the interaction between users and computers Additionally, it is essential in generating software applications from computers to work and manage in order to make people's life simpler and easier Additionally, this contributes to the modernization, advancement, and development of life ● In this assignment, I will write in detail about the programming language, procedural programming, and some of the information I will use to write code, such as variables, conditional statements, or loops, as well as its function and characteristics B- TASK I Programming Language What is Programming Language ● Programming Language are exceptional language and it is created to help programmers to write instruction that allows a machine to perform one or more tasks (Anon., 2019) ● The vocabulary of computers only includes and (binary) Definition 5|Page ● A programming language is a system of notation for writing computer programs Most programming languages are text-based formal languages, but they may also be graphical They are a kind of computer language Features of Programming Language ● We all know that the popularity of a programming language base on the characteristic and utilities that it is provides to programmer The features that a programming language have to stand out are the following ➢ Simplicity: Language must offer clear and simple concepts that make learning and application easier to understand and maintain Simplicity doesn’t mean it can be subtracted from the maximum working capacity (Anon., n.d.) ➢ Efficiency: Programming languages must be quickly interpreted and implemented so as not to take up too much memory space or take too much time (Anon., n.d.) 6|Page ➢ Abstraction: This is the ability to define and use complicated structures or operations while ignoring certain details which affect the ability to write (Anon., n.d.) ➢ Compactness: Using this attribute, operations can be presented in a succinct manner, without writing too many descriptions (Anon., n.d.) 7|Page Compile ● Compilers are computer programs that translate a high-level programming language to a low-level programming language The product of a compiler is an executable file, which is made of instructions encoded in a specific machine code Hence, an executable program is specific to a type of computer architecture Compilers designed for distinct programming languages might be quite different; nevertheless, they all tend to have the overall macro-architecture described in the figure below: Interpreter ● In computer science, an interpreter is a computer program that directly executes instructions written in a programming or scripting language, without requiring them previously to have been compiled into a machine language program ● The interpreter converts the high-level program into an intermediate language it then executes, or it can translate the source code at the high-level and then directly execute the commands, which is done line by line or statement by statement (Anon., n.d.) 8|Page Types of programming language ● There are many types of programming languages available in the market All of these different types of programming languages have their own functionalities and specialties Depending on the functions and abilities of these languages, they are classified into three main types + Machine language + Assembly language + High-level language 9|Page ● A high-level language is a programming language designed to streamline programming for computers It is called high-level because the central processing unit (CPU) of a computer is quite a few steps away from the original code running on High-level source code consists of easy-to – read structures which are then translated into a low-level language which can only be perceived and executed by a specific CPU ● A low-level language is a programming language that deals with elements and limitations of a computer’s hardware It either has an insignificant level of abstraction when referring to a machine or no level of abstraction at all, and it operates to manage the operational meaning of a machine II Procedural Programming What is Procedural Programming ● Procedural Programming may be the first programming paradigm that a new developer will learn Fundamentally, the procedural code is the one that directly instructs a device on how to finish a task in logical steps This paradigm uses a linear top-down approach and treats data and procedures as two different entities Based on the concept of a procedure call, Procedural Programming divides the program into procedures, which are also known as routines or functions, simply containing a series of steps to be carried out Simply put, Procedural Programming involves writing down a list of instructions to tell the computer what it should step-by-step to finish the task at hand Definition ● Procedural programming is a programming paradigm using a linear approach or a top-down one To perform computations it relies on procedures or subroutines ● Procedural programming is also known as imperative programming Functions ● Procedural programming is intuitive in the sense that the way you would expect a program to work is very similar to that If you want to something to a computer, you should give step-by – step instructions on how to it Moreover, most of the languages used to program early on are all procedural FORTRAN, COBOL, and C, which have been around since the 1960s and 70s, are examples of procedural languages ● It is also uses a list of instructions to tell the computer what to step by step 10 | P a g e • Explain flow chart: ➢ Step 1: START ➢ Step 2: use a for loop variable run i to check the character with the condition i

Ngày đăng: 18/12/2022, 04:57

Xem thêm:

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN

w