Algorithms and Programming Paradigms, Thesis of Commercial Law

An overview of algorithms, including examples of algorithms for cooking rice and calculating the difference between two numbers. It also discusses different ways to demonstrate algorithms, such as using pseudocode and flowcharts, as well as the characteristics of algorithms, including finiteness. The document then introduces programming paradigms, including procedural programming and object-oriented programming (oop), highlighting their key features, advantages, and disadvantages. It also covers the event-driven programming paradigm, discussing its key features, advantages, and potential drawbacks. The document then outlines the program development cycle, including steps such as problem analysis, algorithm design, coding, and testing. Finally, it provides an example of a program to solve quadratic equations, demonstrating the steps involved in the software development process.

Typology: Thesis

2020/2021

Uploaded on 08/09/2024

binh-hoang-3
binh-hoang-3 🇻🇳

4 documents

1 / 76

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
ASSIGNMENT 2 FRONT SHEET
Qualification
BTEC Level 5 HND Diploma in Computing
Unit number and title
Unit 1: Programming
Submission date
Date Received 1st submission
Re-submission Date
Date Received 2nd submission
Student Name
HOANG GIA BINH
Student ID
BD00626
Class
SE07202
Assessor name
VO DUC HOANG
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
P4
P5
P6
M2
M3
M4
D2
D3
D4
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
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c

Partial preview of the text

Download Algorithms and Programming Paradigms and more Thesis Commercial Law in PDF only on Docsity!

ASSIGNMENT 2 FRONT SHEET

Qualification BTEC Level 5 HND Diploma in Computing Unit number and title Unit 1: Programming Submission date Date Received 1st submission Re-submission Date Date Received 2nd submission Student Name HOANG^ GIA^ BINH^ Student ID BD Class SE07202^ Assessor name VO^ DUC^ HOANG 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 P3 P4 P5 P6 M2 M3 M4 D2 D3 D

 Summative Feedback:  Resubmission Feedback:

Grade: Assessor Signature: Date:

ACKNOWLEDGMENTS

First of all, I would like to thank my mentor Nguyen Hoang Anh Vu for his constant support in my studies and research, for his patience, motivation, enthusiasm and rich knowledge. His guidance has helped me throughout the time of studying and writing this thesis. Without your wonderful help, I would not have been able to achieve this. In addition to my mentor, I would like to thank my friends who have helped me improve my knowledge of my subject. Not only that, they are always there to support me when I need it. And besides, I would like to thank the school for creating all conditions for me to have adequate facilities to help me complete my work. Last but not least, I would like to thank my family: my parents Hoang Van Son and Truong Thi Hong Song , who gave birth to me from the beginning and supported me spiritually. They are always behind to care and help me have more motivation to complete the work well.

ASSURANCE

I declare that this is my work, based on my research, and that I have recognized all materials and sources utilized in its production, including books, papers, reports, lecture notes, and any other type of document, electronic or personal communication. I further declare that I have not previously submitted this assignment for assessment in any other unit, except where explicit permission has been granted by all unit coordinators involved, or at any other time in this unit, and that I have not duplicated or stolen ideas from the work of others in any way. Signature of the student: Date: I verify that the work I've submitted for this assignment is all my own, and that all research sources have been properly credited. Declaration of the learner

CHAPTER 1: ALGORITHMS, ISSUES RELATED TO ALGORITHMS AND BASIC PROGRAMMING

Define basic algorithms to carry out an operation and outline the process of programming an application. (LO1)

1. Provide a definition of what an algorithm is and outline the process in building an application. (P1) 1.1 Define Algorithms :

  • An algorithm is a set of commands that must be followed for a computer to perform calculations or other problem-solving operations.According to its formal definition, an algorithm is a finite set of instructions carried out in a specific order to perform a particular task. It is not the entire program or code; it is simple logic to a problem represented as an informal description in the form of a flowchart or pseudocode. An algorithm:
  • Is a method or technique that is used to solve a problem. It works by having your computer do a series of predefined actions that define how to accomplish something, and your computer will execute it exactly the same way every time. Figure 1 : Algorithms

Figure 4: Add a sufficient amount of water to cook

Step 4 : Add the rice and water to the pot, cover turn on the cooking button. Cooking time depends on the type of rice and the amount of rice Figure 5: cooking rice

- Example 1 : Diagram showing a simple learning and exam process: Figure 6: Example - Explanation : Diagram showing a simple learning and exam process. Here is an explanation of the symbols and steps in the diagram:  Start : This is the starting point of the process.  Study : The process begins  Exam : This step checks  Pass : pass the subject  Faill : Relearn  End : This is the end point of the process - Example 2: Human resource management block diagram:

Figure 7: Example

- Explanation : This flowchart shows the human resource management of a store.Symbols and steps in the flowchart:  Shop : work starts at the shop  Accountian t: the process of recording, classifying, and summarizing financial transactions  Business : sales staff management  Retailer : the seller of the store's products  Order management : the person who manages the customer's order  Warehouse: manage the products of the store  Warehouse management: product management  Import and Export: export and import of products into the warehouse

This is one of the program's most basic algorithms. Figure 9: Calculate the sum of 2 numbers 1.2.4 : Natural language programming :

  • Is a subfield of AI that deals with the ability of computers to understand and process human language. It is an interdisciplinary field that combines linguistics, computer science, and artificial intelligence. 1.3 Characteristic of Algorithms
  • Finiteness: An algorithm should have finite number of steps and it should end after a finite time.
  • Input: An algorithm may have many inputs or no inputs at all.
  • Output: It should result at least one output.
  • Definiteness: Each step must be clear, well-defined and precise. There should be no any ambiguity.
  • Effectiveness: Each step must be simple and should take a finite amount of time

1 .3.1 State the advantages and disadvantages of the algorithm: Advantages of Algorithms:

  • It is easy to understand.
  • An algorithm is a step-wise representation of a solution to a given problem.
  • In an Algorithm the problem is broken down into smaller pieces or steps hence, it is easier for the programmer to convert it into an actual program. Disadvantages of Algorithms:
  • Writing an algorithm takes a long time so it is time-consuming.
  • Understanding complex logic through algorithms can be very difficult.
  • Branching and Looping statements are difficult to show in Algorithms(imp). 1 .3.2 Steps to writing a good algorithm:
  • Understand the problem.
  • Choose the right data structures and algorithms.
  • Write pseudocode or comments.
  • Implement and test your code.
  • Optimize and refactor your code.
  • Learn from others and practice.
  • Here's what else to consider. 1.3.3 Example of algorithm to calculate the difference of two numbers: Figure 10: Product of 2 numbers