

























Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
bài viết nói về assignment cuối kì môn networking
Typology: Study notes
1 / 33
This page cannot be seen from the preview
Don't miss anything!


























Qualification BTEC Level 5 HND Diploma in Computing Unit number and title Unit 1: Programming Submission date 17/10/2023 Date Received 1st submission Re-submission Date 23/10/2023 Date Received 2nd submission Student Name Do Ngoc Trung Student ID BH Class SEO6302 Assessor name HA NGOC LINH 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 Trung Grading grid P1 P2 M1 D
Grade: Assessor Signature: Date: Lecturer Signature:
III. Conclusion..……………………………………………………………………………………………………………………………….…. IV. Reference List…….………………………………………………………………………………………………………………….……..
Programming is the process of giving machines a set of instructions that describe how a program should be carried out. A computer program consists of code that is executed on a computer to perform particular tasks. This code is written by programmers. Programmers will spend their whole careers learning a variety of programming languages and tools so they can effectively build computer programs. Programmers will start by using a code editor or IDE to write what is called source code. This is a collection of code written in a programming language that other programmers can read. Source code needs to be converted into machine language so machines can understand the instructions and execute the program. This process of converting source code into machine language is known as compiling. Examples of compiled programming languages would be C and C++. There are other languages that do not use compilers. Instead, these languages will use an interpreter that will read and execute the code. Examples of interpreted programming languages would be JavaScript and PHP. Once the code is executed, then the computer program can run. The different types of computer programs include Word processors, Database systems, video games, and websites. These computer programs allow us to interactive with different software devices and services like phones, websites, and the computers themselves.
Figure 1: Characteristics of an Algorithm
- Language Independent: The Algorithm designed must be language-independent, i.e. it must be just plain - instructions that can be implemented in any language, and yet the output will be the same, as expected. - Input: An algorithm has zero or more inputs. Each that contains a fundamental operator must accept zero or more inputs. - Output: An algorithm produces at least one output. Every instruction that contains a fundamental operator must accept zero or more inputs. - Definiteness: The algorithm consists of steps, and at each step we need to ensure clarity, accuracy, understandability and uniqueness for the execution flow based on defined conditions. By referring to any instructions in the algorithm, one can clearly understand what needs to be done. For example, we cannot say "increase x (? ) up" which must be clear how much. For example, "increase x (? ) up 1". The manipulations in the algorithm must be very clear, not cause ambiguity, confusion, arbitrariness. When implementing the algorithm, with the same input data, give the same output. - Effectiveness: With the input data, after a finite number of steps, the algorithm will stop and give the desired result with an acceptable time. Since computing resources and time are finite, it is always necessary to find ways to improve algorithmic efficiency and increase the computational speed of the computer system. The effectiveness of an algorithm can be analyzed at two different stages, before implementation and after implementation. +, Deductive analysis: This is how to analyze the theory of an algorithm. The effectiveness of an algorithm is measured by assuming that all factors, for example, processor speed are constant and do not affect
implementation. +, Fact-based analysis: This is an empirical analysis of an algorithm. The selected algorithm is implemented in a specific programming language and then executed on a computer, actual statistics such as execution time and space required will be collected for evaluation. Assuming x is an algorithm and n (? ) is the size of the input data, the time and space that algorithm x uses are the two main factors that determine the effectiveness of x. +, Time factor: Time is measured by counting the number of operations. +, Spatial factor: Space is measured by calculating the maximum memory space required by an algorithm.
- Independence : An algorithm must have step-by-step instructions, independent of any programming language. Algorithms are never specifically written to support a given program. As we know that all programming languages share the same basic snippet structures such as loops (do, for, while), flow control statements (if-else), ,... These general constructs can be used to write an algorithm. Algorithmic writing is a process and is done after the problem or problem posed by the problem is clearly defined. We have to understand the problem and design our own solution or algorithm. Once there is an algorithm that meets stopping and deterministic accuracy, installation on any programming language is always possible.
Program development process consists of many different steps that are followed by a certain rule in order to be able to develop a computer program. Program development is similar to Software Development Life Cycle (SDLC), but is applied at a higher level to manage the development of multiple programs or software projects. In order to have the effectiveness of the programs used by various institutes or institutions, they should be developed regularly. Only then will the programs run most efficiently. Often IT companies use a circular approach to develop software solutions. The method or procedure is as follows:
Program design can be understood as the path from a problem to a solution in code, or starts by focusing on the main goal that the program is trying to achieve.when the program is well designed is capable of: easier to read and understand later - Fewer errors and errors, easier to extend to add new features, easier to program from the start. In this way, we can divide the program into manageable parts, each of which contributes to the goal. This program design approach is called upper-bottom program design or modular programming. Modular programming or modular design: the problem is clearly defined, several design methods can be applied, it is an important approach is Top-Down program design. It is a structured design technique , it divides the problem into a set of sub-problems called Modules and it creates a hierarchical structure of modules. For each module, the programmer will draw up a concept plan using the appropriate program designer to visualize how the module will perform the assigned work. Program Designer Tools: The various program design tools are described below:
Figure 4: Flowcharts
Coding is an algorithm expressed in a programming language called a program. Program coding can be understood as translating an algorithm into a specific programming language. Programming techniques that use only well-defined control structures are called Structured Programming. The programmer must follow the rules of the language, violation of any rule causes errors. These errors must be eliminated before moving on to the next step. - The programmer when encoding the program in various program languages into source code and compiling the program into object code for the machine. C++, JAVA, LIPS, ORACLE, FORTRAN, etc. are different languages they use to write program code.
Program maintenance is all activities that take place after the completion of the program. It is the process of maintenance and modification , to keep pace with changing requirements and technology. Moreover, program protection is not directly part of the implementation process but it plays an important role. Some of the program maintenance functions include:
Creating a program to calculate the monthly water bill for ABC software involves several steps, including selecting a programming language, creating the project, coding the solution, compiling the code, and running the program. Below is a step-by-step guide to creating and executing the program : B1: Source code (library declaration, namespace, class declaration) B2:Define imput and output program requirements. B3:Define the algorithm. B4: Concretize and declare wings turn into sequences of commands. The pharmaceutical process is called drafting the source program. B5 :Translate the source program to find and repair errors called syntax errors. B6: Run the program, check the output on the screen (check for algorithm errors). Steps 1. Language and Development Environment Selection: Programming Language: C#.
Development Environment: Visual Studio Steps 2. Create the Project: Open Visual Studio. Go to " File - > New - > Project ". Select a "Console App" project type for a simple command-line application. Provide a name for your project (e.g., "WaterBillCalculator") and a location to save it. Click "Create" to create the project.
In Visual Studio, press the "Start" button (a green triangle) to compile and run the program.
translator to convert programs because computers can directly understand programs written in machine language. Pros: Machine languages help programmers execute programs faster than high-level programming languages. +, Assembly language Assembly language (abbreviated as ASM) is also a type of programming language but is more complex than machine language or is considered an intermediate between high-level and low-level languages. It consists of a set of instructions that are symbolic and human-understandable, but still have to use assembler translators to convert assembly language into machine language. The conversion requires the programmer to have knowledge of both machine architecture and register structure. Pros: Assembly language requires less memory and takes less real time to execute programs.
+, Object-oriented programming languages Object-oriented programming (OOP) based on objects. For OOP, the parts within it revolve around classes and objects with certain principles, have inheritance, acquire features of objects, and polymorphism creates many forms of functions. It is used to abstract objects in the real world. The program written in an object-oriented programming language is reusable, highly efficient, and easy to use. Pros: The object-oriented programming language is easy to implement, faster to handle, and easy to debug, modify and maintain. +, Natural language Natural programming languages are almost identical to languages used in everyday human communication like world languages such as French or Japanese. Through interpreters, machines can understand natural language and perform operations based on commands from natural language. Specifically, applications in named object recognition (NER), relationship extraction, and topic segmentation. Pros: Natural programming languages help users ask machines questions on any topic and get live answers within seconds.