You are on page 1of 23

BTEC FPT INTERNATIONALCOLLEGE

INFORMATION TECHNOLOGY

ASSIGNMENT 1
UNIT: PROGRAMMING

STUDENT :NGUYEN VIET HUNG

CLASS :IT05102

STUDENT ID :BD00186

SUPERVISOR : NGUYEN HOANG ANH VU

Da Nang, June 2022


ASSIGNMENT 1 FRONT SHEET

Qualification BTEC Level 4 HND Diploma in Business

Unit number and title Unit: Programming

Date received (1st


Submission date
submission)

Date received (2nd


Re-submission date
submission)

Student name Nguyen Viet Hung Student ID BD00186

Class IT05102 Assessor name Nguyen Hoang Anh Vu

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:
Hung
Nguyen Viet Hung

Grading grid

P1 M1 D1

Performed by …..
❒ Summative Feedbacks: ❒ResubmissionFeedbacks:

Grade: Assessor Signature: Date:

Internal Verifier’s Comments:

Signature & Date:

Performed by P
ACKNOWLEDGMENTS

First of all, I would really like to thank my mentor Nguyen Hoang Anh Vu for his regular aid
in my studies and research, for his patience, motivation, enthusiasm and wealthy information. His
steering has helped me for the duration of the time of reading and penning this thesis. Without
your brilliant assist, I could now no longer were capable of reap this.

In addition to my mentor, I would really like to thank my friends who've helped me


enhance my information of my subject. Not best that, they may be usually there to aid me once I
want it. And besides, I would really like to thank the college for developing all situations for me to
have ok centers to assist me whole my paintings.

Last however now no longer least, I would really like to thank my family: my dad and mom
who gave beginning to me from the start and supported me spiritually. They are usually in the
back of to care and assist me have greater motivation to finish the work well.

Performed by P
ASSURANCE
I claim that that is my work, primarily based totally on my research, and that I actually have identified all
substances and reassets applied in its production, along with books, papers, reports, lecture notes, and
another sort of document, digital or non-public communication. I in addition claim that I actually have
now no longer formerly submitted this venture for evaluation in another unit, besides in which express
permission has been granted via way of means of all unit coordinators involved, or at another time on
this unit, and that I actually have now no longer duplicated or stolen idea from anyone

Declaration of the learner

I verify that the work I've submitted for this assignment is all my own, and that all
research sources have been properly credited.

Signature of thestudent: Date:


Hung
Nguyen Viet Hung

Performed by P
TABLE OF CONTENT
INSTRUCTOR/ SUPERVISOR/ ASSESSOR...............................................................................................i
REVIEWERS........................................................................................................................................... ii
ACKNOWLEDGMENTS......................................................................................................................... iv
ASSURANCE.........................................................................................................................................v
TABLE OF CONTENT............................................................................................................................ vi
LIST OF TABLES AND FIGURES............................................................................................................vii
LIST OF THE ACRONYM....................................................................................................................... ix
INTRODUCTION................................................................................................................................... 1
CHAPTER 1: ALGORITHMS, ISSUES RELATED TO ALGORITHMS AND BASIC PROGRAMMING...............2
1. Define basic algorithms to carry out an operation and outline the process of programming an
Application (LO1)........................................................................................................................... 2
1.1 Provide a definition of what an algorithm is and outline the process in building an
Application (P1).......................................................................................................................... 2
1.1.1 Define Algorithms.........................................................................................................2
1.1.2 The process in building an application........................................................................ 11
1.2 Determine the steps taken from writing code to execution ( M1)......................................16
1.3 Examine the implementation of an algorithm in a suitable language. Evaluate the
relationship between the written algorithm and the code variant (D1)........................................... 18

CRITICAL EVALUATION.....................................................................................................................18

CONCLUSION.................................................................................................................................... 19
REFERENCES...................................................................................................................................... 20

Performed by P
LIST OF TABLES AND FIGURES

Figure 1-1: Algorithms..........................................................................................................................2


Figure 1-2: rinsing the rice.................................................................................................................... 2
Figure 1-3: Using the proper water ratio.............................................................................................. 2
Figure 1-4: Bringing the water to a boil................................................................................................3
Figure 1-5: Maintaining a low heat...................................................................................................... 3
Figure 1-6: Cooking should be done without lookingor stirring...........................................................3
Figure 1-7: Cover the rice and set it asideto rest................................................................................. 4
Figure 1-8: Toss the rice with a fork to fluff it up................................................................................. 4
Figure 1-9: Apply warm water to your face..........................................................................................5
Figure 1-10: Use your preferred cleaner...............................................................................................5
Figure 1-11: Exfoliate your skin gently................................................................................................. 5
Figure 1-12: Rinse well and pat dry...................................................................................................... 6
Figure 1-13: Use toner.......................................................................................................................... 6
Figure 1-14: Apply a moisturizer.......................................................................................................... 6
Figure 1-15: Flowchart symbols............................................................................................................7
Figure 1-16: Determine which number isthe biggest.......................................................................... 8
Figure 1-17: Sum of a and b................................................................................................................. 8
Figure 1-18: Solve first-degree equations.............................................................................................9
Figure 1-19: Source code solvefirst-degree equations....................................................................... 10
Figure 1-20: Output solvefirst-degree equations............................................................................... 10
Figure 1-21: The Software development cycle.................................................................................... 11
Figure 1-22: Analyzing the Problem................................................................................................... 11
Figure 1-23: The Algorithms............................................................................................................... 11
Figure 1-24: Execution of the test....................................................................................................... 12
Figure 1-25: Final Documentation...................................................................................................... 12
Figure 1-26: The software development cycle.................................................................................... 12
Figure 1-27: The software development cycle.................................................................................... 13
Figure 1-28: Design and Prototyping.................................................................................................. 13
Figure 1-29: Source code.................................................................................................................... 14
Figure 1-30: Try three random numbers.............................................................................................15

Performed by P
LIST OF THE ACRONYM
CLR Common Language Runtime
CSC Common Service Center
GUI Graphical User interface
IBM International Business Machines
JSC Joint Stock Company
I/O Input/Output
PE Portable Executable
RAM Random Access Memory

Performed by P
INTRODUCTION

Programming performs an exceptionally critical function in life. Coming to this report, we can study
algorithms, issues associated with algorithms and fundamental programming. It will assist us
apprehend extra deeply what's an set of rules, how is an set of rules defined? What is the procedure
of constructing an set of rules, and the way does the set of rules work? Let's discover on this
assignment!
 This report includes the following:
Chapter 1: Algorithms, issues related to algorithms, and basic programming.

1. Define basic algorithms to carry out an operation and outline the process of programming

an application.

1.1 Provide a definition of what an algorithm is and outline the process in building an

Application.

1.2 Determine the steps taken from writing code to execution.

1.3 Examine the implementation of an algorithm in a suitable language. Evaluate the


relationship between the written algorithm andthe code variant.

Performed Student: 1
CHAPTER 1: ALGORITHMS, ISSUES RELATED TO ALGORITHMS
AND BASICPROGRAMMING
1. Define basic algorithms to carry out an operation and outline the process
of programming an application. (LO1)
1.1 Provide a definition of what an algorithm is and outline the process
in building an application. (P1)
1.1.1 Define Algorithms
- In simple terms algorithms are methods, ways in
which people are required to follow certain procedures,
then it will achieve optimal results.This method can to
from many other sources, can be a house science of
them light mode, also be a group of people that or many
years of experience, when you apply it correctly, you will
get better results then doing yourself.
Imples of algorithms in real life: Figure 1-1: Algorithms
 We generally use one of two methods to represent the algorithm:

 I have an example of a natural language rice cooking algorithm

Step 1: Measure the rice accurately.


Step 2: Wash clean rice with water.
Step 3: Soak rice for 30 minutes to cook rice more evenly.
Step 4: Measure the water suitable for the amount of rice.
Step 5: Cook rice properly.
Step 6: Incubate the rice for 5 to 10 minutes.

 Flowchart symbols:
- is a diagrammatic representation of an algorithm
- It uses a variety of symbols to describe the steps necessary to solve an issue.

Performed Student: 2
Figure 1-15: Flowchart symbols
 More information:
- The form of the oval shows whether or not the set of rules is at its starting or end. Its
cloth is commonly divided into sections: "beginning" and "ending."

Performed Student: 3
 Create a good algorithmby following these steps:
-The trouble could have lots of solutions, however it'll nonetheless produce outcomes. A right set
of rules, on the opposite hand, will make our software program run quicker, the code may be shorter,
and it'll assist our application run with as few or no errors as possible, and the laptop will do it quicker
than if the set of rules is finished poorly.
-Your software program does now no longer necessitate the use of a high-quit machine.
 To design an algorithm, we must first implement it and consider the following issues:
 Finality: The algorithm requires an endpoint, and the loops that are produced require a
breakpoint to avoid infinite loops. The algorithm's number of steps is limited.
 Efficiency and dependability: The problem's output must not be inconsistent or
contradictory to the problem's requirements.
 Exactly: The algorithm's findings satisfy the problem's requirements.
 Efficiency and resiliency: When it comes to comparable issues, algorithms must be
adaptable.
 Nimble: The best algorithm will meet the processing time and deliver quick results.
 Examples of how to use block diagrams, create excellent algorithms, and apply algorithm
characteristics include:
Problem solving first-degreeequations:
 Input: Enter number a and b.
 Output: Display the solution of the equation.

Figure 1-18: Solve first-degree equations

Performed Student: 4
 Note:When a couple of algorithms are used to clear up a problem, the solution is the same. We
should pick out the most inexperienced algorithm. It will useful resource withinside the faster
and better basic overall performance of our software.
1.1.2 The process in building an application.
 A set of basic algorithm steps for carrying out a task:
 Defining or analyzing the problem
 Design (Algorithm)
 Coding
 Documenting the program
 Compiling and running the program
 Debugging and testing
 Maintenance Figure 1-21: The software development cycle
 Defining and Analyzing the Problem:
- We investigates the problem on this stage. we decide
the handiest technique for resolving those issues. Studying an
trouble is likewise essential because it aids a programmer in
making choices regarding the following:
Figure 1-22: Analyzing the Problem
 The data and statistics required for the program's development.
 The way the program will be put together.
 In addition, the language wherein this system will paintings best.
 What is the preferred output and in what layout is it required, …etc.
1.1.3:Steps in program development

 Step 1: Planning. We will use IDE Microsoft visual studio with C# programming language.

Performed Student: 8
Figure 1-27: The software development cycle
 Step 2: Define Requirements.
 Input: Two numbers: a, b of the first degree equation
 Output: The solutions of the equation
 Step 3: Designand Prototyping.
Flow chart:

Figure 1-28: Design and Prototyping

Performed Student: 9
 Step 4:Software Development
Source code:

Figure 1-29: Source code

Performed Student: 10
 Step 5: Testing
 Firstly, I let a=0 and b!=0

 Figure 1-30: I a=0 and b!=0

 Next, I let a != 0, b is a randomnumbers.

Figure 1-31: let a != 0, b is a randomnumbers.


 Next, I let a = 0, b = 0 and c be a randomnumber.


Figure 1-32: a = 0, b = 0.

 Step 6: Deployment
- In software program application and on line development,
deployment refers to the device of moving changes or updates
from one deployment environment to another.
Figure 1-34: Deployment

Performed Student: 11
- When constructing a website, you may constantly have your stay website, frequently
called the manufacturing surroundings or stay surroundings.
 Step 7: Operation andMaintenance
- Web Application Development is vital, but so is system maintenance.
- It keeps solutions agile in order to adapt with rapidly changing technology and business
conditions.
- Once the operation is completed, it is followed by a lengthy management phase.
- Software maintenance include enhancing software performance by improved
development, lowering mistakes, and removing unnecessary development.

Figure 1-35: Operation and Maintenance


1.2 Determine the steps taken from writing code to execution. (M1)

For example quadratic equation problem solving

Step 1: Determine the content of the problem:

A quadratic equation is an equation of the form ax2 + bx + c = 0 (a ≠ 0) (1).Solving quadratic equations is to


find the value of x such that when x is substituted in equation (1), ax2 + bx + c = 0 is satisfied.

Step 2: Flowchart diagram:

Performed Student: 13
Step 3:Source code

Performed Student: 14
Step 4: Perform debugging

Recheck the program and fix the error

Step 5: Run the program


 Firtsly I try 3 random number


 Next, I let a = 0, b = 0 and c be a randomnumber


Performed Student: 15
 Next, I let a = 0, b and c be 2 randomnumbers


 Finally,I let a = 0, b = 0 and c = 0

1.3 Examine the implementation of an algorithm in a suitable language.


Evaluate the relationship between the written algorithm and the code variant (D1)

Performed Student: 16
CRITICAL EVALUATION

Performed Student: 14
CONCLUSION
After completing this report, I understood and grasped how to build a basic algorithm, the
process to execute a program, the life cycle of an algorithm, how to draw a flow chart to explain
How does the algorithm work?
Programming is really amazing! thanks to it I understand how the devices around us work.
This is very interesting and fantastic. Thankyou my Mentor!

Performed Student: 15
REFERENCES
1. hnglobal.highernationals.com (2021). Cloud Computing, Computing & Digital Technologies
Resource Library [online]. Available:
https://hnglobal.highernationals.com/subjects/computing/resource-library. [Accessed 18 June
2021].

Performed Student: 20

You might also like