Docsity

Assignment1Programming, Transcriptions of Information Technology

Toggle sidebar
bg1
ASSIGNMENT 1 FRONT SHEET
Qualification
BTEC Level 5 HND Diploma in Computing
Unit number and title
Unit 2: Programming
Submission date
7/12/2022
Date Received 1st submission
Re-submission Date
Date Received 2nd submission
Student Name
Nguyen Quoc Thang
Student ID
BC00066
Class
IT05101
Assessor name
Tran Van Nhuom
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
P2
M1
M2
D1
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12

Partial preview of the text

Download Assignment1Programming and more Transcriptions Information Technology in PDF only on Docsity!

ASSIGNMENT 1 FRONT SHEET

Qualification BTEC Level 5 HND Diploma in Computing

Unit number and title Unit 2: Programming

Submission date 7/12/2022 Date Received 1st submission

Re-submission Date Date Received 2nd submission

Student Name Nguyen Quoc Thang Student ID BC

Class IT05101 Assessor name Tran Van Nhuom

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 P2 P3 P4 M1 M2 D

 Summative Feedback:  Resubmission Feedback:

Grade: Assessor Signature: Date:

Lecturer Signature:

A.Introduction

Many people today still face many problems and have to hesitate every time they plan to travel.

One of those issues is concerns about hotel availability, so this article will introduce an online hotel booking

program that solves a problem that some people still have. are encountered. The report contains the

algorithms used and gives a brief introduction to it.

B.Theory

I. Algorithm

a. Definition

An algorithm is a defined sequential computing technique that accepts a value or set of

values as input and produces the outputs needed to solve a problem. The algorithm is said to be

correct if and only if it stops with the appropriate output for each input case. An algorithm

independent of the languages used. It tells the programmer the logic used to solve the problem.

As can be seen, it is a logical step-by-step procedure that acts as a blueprint for programmers.

b. Characteristics

The features of the algorithm are:

 Input: An algorithm requires some input value. An algorithm can be given a non-zero value

as input.

 Output: At the end of an algorithm, you will have one or more results.

 Finiteness: An algorithm must be finite. Finitude in this context means that the algorithm

must have a limited number of instructions, i.e., those instructions must beenumerable.

 Clarity: A perfect algorithm is defined as opaque, which means that its instructions should

be clear and easy to understand.

 Efficiency: Because each instruction in an algorithm affects the overall process, it must be

complete.

 Language Independence: An algorithm must be language independent, which means its

instructions can be executed in any language and produce the same result.

c. Example

Example of an algorithm in real life: Egg fried rice dish

Input: rice, egg, soy sauce, garlic, pepper, MSG.

Output: egg fried rice.

First prepare all the ingredients, heat the oil in the pan and then add the garlic until fragrant.

Figure 2. Add the rice and eggs

and mix well

Figure 1. Fry garlic in hot oil

Another example of the algorithm is the flowchart of the following math exercise:

Figure 4. Example flowchart

II. Step in programming development

All activities of a software development project must be planned, divided into phases and arranged

in a logical sequence. This order is known as the software development process or also known as the

software development life cycle. Every software development process is an important step of the process

of developing a system, so this is the most basic knowledge that any software developer or tester needs

to know.

a. Problem definition

The first step that anyone needs to take is to define the problem to be solved. Define the

problem to help us better understand the requirement and know what to do in the program.

b. Problem analysis

Next we need to go into each step, analyze the data to produce the most detailed report

on the software development plan. This is also one of the most important steps in the software

development life cycle, it contributes to the quality of the product.

c. Algorithm development

For each specific product and requirement, the programmers will be responsible for the

preliminary design drawings as well as creating the framework to shape the software. At this step,

we will agree using an algorithm. Other tools such as final flowchart to conduct product

programming.

d. Coding and documention

Programmers will use advanced programming technology and popular programming

languages to create products. Currently there are many popular programming languages such as

C#, C++, Python, Java, Javascript,... they will choose the most suitable programming language to

code the program.

e. Testing and debugging

Run the program and find out the errors in the programming process. Testing and

debugging is an integral step in program development. To create a finished product, we need to

put the product to the test many times to ensure quality control and to fix errors in the

programming process early.

f. Maintaince

After the programmer completes the above steps of the development of a program, the

programmers come to the final step of the software development process. At this step, the

programmer still closely follows the support and corrects any errors that arise during the use of

the software. Program maintenance is a necessary stage to meet all the different needs of program

users, this is also the task that programmers have to do the most in their work.

C.Program “Booking hotel room”

I. Problem definition

In today's life, the problem that people often travel still have to worry about is whether the tourist

destination to go there can find the hotel as desired or not. Understanding the needs of customers, I

proceeded to develop an online hotel reservation program from my Bac Nam hotel program. Developing

a program with many functions to help customers store information and easily check, there are many types

of rooms, services and utilities. Finally, customers can pay online extremely convenient to meet their

needs.

IV.Function analysis

Figure 6. Flowchart for the program

V. Program function

a. Funtion “Personal information”

Here users can save personal information such as full name, year of birth, gender, identity

card. Store and check all customer information with ease.

Figure 7 & 8. Source code of funtion "Information"

Figure 9, 10 & 11. Source of funtion "Room"

c. Funtion “Booking”

At the "Booking" function, users who want to use it to pay need to enter the number of

days to use the room, the used room rate and the total price of hotel services. The program

system will calculate the number of days to use the room multiplied by the room rate to get the

result and then add the total service fee used.

Figure 12 & 13. Source of funtion "Booking"

VII.Running program

Figure 15, 16 & 17. Running program