đề assignment cuối kì môn networking, Study notes of Law

bài viết nói về assignment cuối kì môn networking

Typology: Study notes

2022/2023

Uploaded on 12/06/2023

do-ngoc-trung-btec-hn
do-ngoc-trung-btec-hn 🇻🇳

7 documents

1 / 33

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
ASSIGNMENT 1 FRONT SHEET
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
BH00901
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
D1
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21

Partial preview of the text

Download đề assignment cuối kì môn networking and more Study notes Law in PDF only on Docsity!

ASSIGNMENT 1 FRONT SHEET

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

 Summative Feedback:  Resubmission Feedback:

Grade: Assessor Signature: Date: Lecturer Signature:

III. Conclusion..……………………………………………………………………………………………………………………………….…. IV. Reference List…….………………………………………………………………………………………………………………….……..

I. INTRODUCTION

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.

II. CONTENT

1. Algorithm

a, Definition.

  • Algorithm can simply be understood as a set of steps used to complete a specific task. They are the building blocks for programming and enabling things like computers, smartphones, and websites to function and make decisions. Algorithm can also be a procedure used to solve a problem or perform a calculation. The algorithms act as an accurate list of instructions for performing specific actions step by step in a hardware or software-based Process.
  • The algorithm is widely used in all areas of IT. In mathematics, computer programming, and computer science, an algorithm usually refers to a small procedure for solving a repetitive problem. Algorithms are also used as specifications to perform data processing and play a major role in automated systems.
  • Algorithms, in addition to being used in IT fields, are also used in a lot of daily life and work. Suppose you want to drink an action of peach tea, in order to be able to successfully drink a cup of peach tea, you need to take certain steps in a specific order : Step 1: choose the tea that you want to drink. Step 2: : brew tea with hot water. Step 3: Separate the leaf from the brewed tea. Step 4: enjoy tea.
  • This whole process is really an algorithm. Because you've followed these steps in a specific order, you've achieved the desired result: your tea is delicious and wants to enjoy more. But if you make the mistake of choosing tea or brewing water with cold water, your tea will lose more flavor.
  • Additionally, the algorithm can be used to sort sets of numbers or for more complex tasks, such as recommending user content on social media. Algorithms usually start with initial input and instructions describing a specific calculation. When calculations are made, the process generates an output.

b,Features of alorithm.

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.

2.How to develop a program:

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:

b, Design (Algorithm)

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:

  • Structure Charts – A structure chart, also called Hierarchy chart, show top-down design of program. Each box in the structure chart indicates a task that program must accomplish. The Top module, called the Main module or Control module. For example: Figure 3: Structure Charts.
  • Algorithms – An algorithm is a step-by-step description of how to arrive at a solution in the most easiest way. Algorithms are not restricted to computer world only. In fact, we use them in everyday life.
  • Flowcharts – A flowchart is a diagram that shows the logic of the program. For example:

Figure 4: Flowcharts

  • Decision tables – A Decision table is a special kind of table, which is divided into four parts by a pair of horizontal and vertical lines.
  • Pseudocode – A pseudocode is another tool to describe the way to arrive at a solution. They are different from algorithm by the fact that they are expressed in program language like constructs.

c, Coding

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.

d, Documenting the program

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:

  • Finding and correcting the errors.
  • Modify the program to enhance it. Besides, we must revise it regularly to adapt to some new government laws or policies. We must also modify it in case if we want to change the hardware or operating system.
  • Update the documentation part.
  • Add new features and functions.
  • Remove useless parts of code. Despite the general perception that maintenance is required to correct bugs that arise after the software goes live, in practice, most maintenance work involves the addition of minor or key capabilities to existing modules.

3. Determine the steps taken from writing code to execution

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.

Step 4. Compile and Run the Program:

In Visual Studio, press the "Start" button (a green triangle) to compile and run the program.

4.Language programming:

a, Analysis.

  • Programming languages are used as a method of communicating information between programmers and computers used in the IT industry. Programming languages are similar to how we communicate every day. It is simply understood as a combination of instructions with many outputs developed by the programmer and used as a language to communicate with a computer, through which the computer can understand and implement algorithms. Programming languages are written in a specific language such as C, C ++, Java, Python ... to perform specific tasks. Programming languages are mainly used to develop applications for computers, mobile phones or websites.
  • Programming languages will have their own characteristics, distinguish them from each other and be

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.

  • High-level Programming Language (HLL) is a language used to develop user-friendly software and websites that closely resemble human language. Therefore, it takes a compiler to convert to machine language for the computer to understand and execute the program. Pros: A high-level programming language is a programming language close to everyday language that makes it easy for users to read, write, and maintain. High-level programming languages include Python, Java, JavaScript, PHP, C#, C++, Objective C, Cobol, Perl, Pascal, LISP, FORTRAN, and Swift. +, Procedural programming language Procedure Oriented Programming (POP) is a structured and procedural programming technique. It divides a program into functions and in them can contain smaller subfunctions. The procedural programming language POP is often used to create programs using a programming editor such as the IDE, Adobe Dreamweaver or Microsoft Visual Studio. Pros: POP makes it easy for programmers to track program flow and reusable code in other parts of the program.

+, 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.

  • Intermediate programming languages
  • A mid-level programming language is an intermediary between a low-level programming language and a high-level programming language.
  • Pros: Support for high-level, user-friendly and closely related programming language features as a stepping stone between machine language and human language.

b, Evaluation

  • Language evaluation criteria in programming languages are sets of standards and principles used to assess the quality and effectiveness of programming languages. These criteria are used to evaluate the features, design, syntax, and semantics of programming languages in order to determine their suitability