Assignment 1 - 1618 - Report
Assignment 1 - 1618 - Report
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.
Grading grid
P1 M1 D1
1
Summative Feedback: Resubmission Feedback:
2
Table of Contents
I. Overview about Algorithm with image illustration, explanation and example………….4
1. What is an Algorithm?............................................................................................4
2. Example an Algorithm………………………………………………………………………………………..4
2.1. Searching Algorithm……………………………………………………………………………….4
2.2. Sorting Algorithm……………………………………………………………………………………5
2.3. Represent a small, simple problem and solve this problem…………………….5
II. Analyze the problem and design the solutions by the use of suitable methods………..6
1. Analyze the problem…………………………………………………………………………………………..6
2. Flowchart……………………………………………………………………………………………………………6
III. Demonstrate the compilation and running of a program………………………………………….7
1. Introduce how the problem is solved………………………………………………………………….7
2. Source code and screenshots of the final result………………………………………………….8
3. Explain how the source code is compiled……………………………………………………………9
References………………………………………………………………………………………………………………………….10
Figure 4: Flowchart
3
I. Overview about Algorithm with image illustration, explanation and example
1. What is an Algorithm?
An algorithm is a set of directions for performing a task. For achieving a mission. For solving a
problem, an algorithm can be understood as a finite set of explicit instructions that the problem
solver can follow to solve the problem. Thus, the Algorithm is a method of expressing the
problem's solution - the concern.
In programming, there are six popular types of Algorithm: Search Algorithm, Sort Algorithm,
Link Analysis, Integer Factorization, Fourier Transform Algorithm, String Matching, and Pass
Algorithm.
2. Example Algorithms
4
Figure 2: Example for a Searching algorithm
Selection sort: is a sorting algorithm that selects the smallest element from an unsorted
list in each iteration and places that element at the beginning of the unsorted list.
5
II. Analyze the problem and design the solutions by the use of suitable methods
a = 0, b = 0, c ≠ 0
The equation hasn’t solution.
a = 0, b ≠ 0, c ≠ 0
The equation has a unique solution: x = -c / b
a, b, c = 0
The equation has infinitely many solutions.
2. Flowchart
6
Figure 4: Flowchart
I make a small and simple program, then I will input 3 coefficients a = 4, b = -20, c = 28. Then
the program will help me to give the correct result. My little program is completed in C#
programming language.
7
2. Source code and screenshots of the final result
The second part is to considers coefficients and delta using if-else statement
8
Figure 6: Use if-else statement for coefficient and delta
Runtime Linker
library files
Executable
file
9
References:
https://www.geeksforgeeks.org
https://www.w3resource.com
http://www.conceptdraw.com
10