








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
An overview of algorithms, their definition, and examples of various algorithms used in different fields. It then analyzes a specific problem, designs a solution using suitable methods, and demonstrates the compilation and running of a program in c# to solve the problem. The software development life cycle (sdlc) model, explaining its phases and the role of compilers in the software development process. The content is suitable for university students studying computer science, programming, and software engineering, as it covers fundamental concepts of algorithms, problem-solving, and software development practices.
Typology: Study notes
1 / 14
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 10 /12/ 2022 Date Received 1st submission
Re-submission Date Date Received 2nd submission
Student Name Vang Phu Qui Student ID GCH
Class GCH1106^ Assessor name Pham^ Danh^ Tuyen
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 M1 D
Algorithms have existed for a long time, they help people in most fields such as math, science,... And now, in the 4.0 era, they support a lot in the field of science. calculator. They make it easier for people to create and develop high-tech software and products by solving each algorithm and combining them. In this assignment, I will present the concept of algorithms, examples of algorithms in life, present a small problem and how to solve it using algorithms, diagrams and and use C# programming language to solve that problem.
1. Overview about Algorithm
1.1 Definition of algorithm
An algorithm is a method, formula, or a specific finite-step procedure for solving a problem that is based on performing a series of specified actions. A computer program may be thought of as a complex algorithm. In mathematics and computer science , an algorithm is a short process that solves a recurring issue. The term algorithm is derived from the name of a mathematician, Mohammed ibn-Musa al-Khwarizmi, who flourished between 780 and 850 and was a member of Baghdad's royal court. Al-work Khwarizmi's is also the most likely origins of the term algebra.
Algorithms are named after the specific problem they solve
Bidirectional search algorithm. K-way merge algorithm.
1.3 Example of algorithms
<Find the second largest value of 10 interger numbers entered from the keyboard= To implement the algorithm and produce its results, we have: Input: 10 integers entered from the keyboard Output: the second value of the sequence
Algorithm solving process:
STEP 2: Decalera MAX = 0, Array B[10] STEP 3: Set variable i = 0 STEP 4: for i < length of array B, repeat STEP 5 STEP 5: Read B [i] STEP 6: if N[i] > MAX is true then STEP 6.1: Set MAX= B[i] STEP 8: Read MAX STEP 9: Decalera MAX2 = 0 STEP 10: for i < length of array B, repeat STEP STEP 11: Read B[i] STEP 12: if B[i] > MAX2 and B[i] < MAX is true STEP 12.1: Set MAX2 = B[i] Step 13: Print MAX STEP 14: STOP
After solving the above algorithm, the result of the main algorithm is MAX2.
2. Analyze the problem and design the solutions by the use of suitable methods.
2.1 Analyze the problem
To solve the problem, I will use the C# programming language to create a program that can meet the needs of a library manager. In addition, I will apply the experience from "Procedural Programming", and use libraries, variables, expressions, loop statements, conditional statements, to solve this problem.
First, we need to define the Input and Output of this algorithm Input: information of books to enter such as: book code, book title, quantity and price of the book Output: Includes information of imported books, books with the least quantity, and the books with the highest price
Flowchart for finding min
3. Demonstrate the compilation and running of a program.
3.1 Screenshots of the final result
3.2 Explain briefly what is Software Development Life Cycle
. Definition
The Software Development Life Cycle (SDLC) model is a conceptual framework used in project management that describes all processes in a software development project, from planning through maintenance. This process is linked to numerous models, each of which includes a range of duties and activities.
It is usually separated into 6 steps: Ideation and planning, requirements gathering, design and prototyping, software development, testing and integration, implementation and deployment, Operation and maintenance. Depending on the scale of the project, some project managers will combine, divide, or eliminate steps. 7 phases in the SDLC model.
7 phases in SDLC model.
The entire SDLC process
3.3 How the source code is compiled
A source code, also known as a program, is created using a programming language to make it easy for humans to code. These programs need to be translated into machine language to execute them (computer understandable language). This translation is known as compilation or interpretation.
While code written in any programming language must be parsed, some codes are compiled, and some are interpreted. Code written in languages used for software development such as C, C++, Java, etc., is compiled. These languages are designed to create executable programs, so the code written in them needs to be compiled. Code written in languages used for web development such as Javascript, PHP, VBScript, etc., is interpreted. These languages are designed to create web applications and display data on web pages, not to create executable programs. So code written in them needs to be interpreted.
What is a Compiler?
A compiler is a unique program that processes statements written in a particular programming language and turns them into machine language or "code" that a computer's processor uses. Typically, a programmer writes language statements in a language such as C, C++, or Java one line at a time using an editor. The file that is created contains what are called the source statements. The programmer then runs the appropriate language compiler, specifying the file's name that contains the source statements.
Role of a compiler
A compiler takes the program code (source code) and converts the source code to a machine language module (called an object file). Another specialized program, called a linker, combines this object file with other previously compiled object files (in particular run-time modules) to create an executable file. So, the conversion from source code to machine-executable code takes place before the program is run.
Following are the two steps involved in the compilation:
1. Source code is turned into object code by a compiler A compiler turns source code into object code, but it is not ready to become a program. Before object code can become a program, it has to pass through a linker.
How to compile?
Now that you have a fair understanding of what a compiler is and how it works let us now understand how you can compile a source code.
There are various free and open-source compilers available in the market, which you can download as per the programming language you have used to write the code. Compilers are also OS-dependent, and hence you will have to choose accordingly. The most popular and largely used is the GCC developed by the GNU project. It is compatible on most of the operating systems which makes it so popular among the coders. Let us understand more about GCC and its functionalities
Techopedia. Some algorithsm. [Online] Available at: https://www.techopedia.com/definition/3739/algorithm http://www.mms.com/ [Accessed 28 September. 2021]. WhatIs.Techtarget. Definition of algorithms. [Online] Available at: https://whatis.techtarget.com/definition/algorithm [Accessed 28 September. 2021]. DINHNGHIA.VN. Algorithms properties. [Online] Available at: https://dinhnghia.vn/thuat- toanla-gi-tinh-chat-vai-tro-phan-loai.html [Accessed 28 September. 2021]. Donald E. Knuth. 1968. The Art of Computer Programing. Vol. 1. Anders Hejlsberg. 2004. The C# programming language. Addision Wesley. Page XIII. RELAVANT. SDLC. [Online] Avaiable at: https://relevant.software/blog/7-steps-for-
effectivesoftware-product-development/ [Accessed 3 October. 2021].