Download as pdf or txt
Download as pdf or txt
You are on page 1of 13

ASSIGNMENT 1 FRONT SHEET

Qualification BTEC Level 5 HND Diploma in Computing

Unit number and title Unit 1: Programming

Submission date 1/10/2019 Date Received 1st submission

Re-submission Date Date Received 2nd submission

Student Name HOANG MINH HOAN Student ID GCD18317

Class GCD0705 Assessor name srikanthraju

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 HOAN

Grading grid

P1 M1 D1
 Summative Feedback:  Resubmission Feedback:

Grade: Assessor Signature: Date:


Lecturer Signature:
Table of Contents
LO1: Define basic algorithms to carry out an operation and outline the process of programming an application .................................... 4
P1: Provide a definition of what an algorithm is and outline the process in building an application. .................................................... 4
- Definition of algorithms, characteristics of algorithm with explanation and example ................................................................ 4
- Define criteria to measure a good algorithm. Explain how to measure it with example ............................................................. 7
- Explain the 7 steps of building an application ............................................................................................................................. 7
M1: Determine the steps taken from writing code to execution. ............................................................................................................ 9
D1: Examine the implementation of an algorithm in a suitable language. Evaluate the relationship between the written algorithm and
the code variant. .................................................................................................................................................................................... 10
LO1: Define basic algorithms to carry out an operation and
outline the process of programming an application

P1: Provide a definition of what an algorithm is and outline the process in building
an application.
- Definition of algorithms, characteristics of algorithm with explanation and example

 Definition of algorithms:
a) Algorithm is a step by step approach to solving problems. It is often used for data processing, computing and other related
mathematical and computing operations.

In other words, an algorithm is a set of specific rules or procedures that solve a problem in a finite number of steps, or to provide a
result from a set of input data.

Technically, computers use algorithms to arrange detailed instructions for performing an operation.

North forces users to provide an email address which is probably one of the most common tasks that a web-
based program might need to perform, so we'll use it here as an example. An algorithm can be written as a list
of steps using text or in the form of images with shapes and arrows called diagrams.
The steps are as follows:

Step 1: This is really just a start and end procedure (referring to a reminder)
Step 2: Create a computer storage location for the user to enter as a variable.
Step 3: Perform deleting variables because in other processes may be reused and do not want old and new content
mixed together
Step 4: prompt the user for a basic email address
Step 5: paste it into our convenient variable.
Step 6: perform a computer review to carefully review this email address - is it really an email address?

b) . Algorithm to solve the procedures of the dental hospital include.

The patient calls the counseling department, and then makes an appointment to meet the patient. If the patient
agree to the appointment, the patient will go to the hospital. And have the procedures the patient needs to do,
such as patients pay the cost of medical examination and consider the conditions of health insurance. The
patient then responds to the doctor's medical examination. After the completion of the check and patient's
medical record, medical report and medical report Assign the treatment to the patient. The patient receives the
results and understands the appointment. If the patient agrees to treatment, pay for the treatment and choose the
doctor and the appropriate time for treatment. During treatment, patients are monitored Appointed and returned
home. After the end of treatment patients are scheduled to hospital to check again. If the results are good, the
patient will end the course of treatment and if the results are not good, the patient will be re-selected for
healing.
 characteristics of algorithm:

1. Finiteness: The algorithm must be terminated after certain steps.


2. Definiteness: Determine exactly the steps of the algorithm
3. Input: An algorithm has zero or more inputs, i.e, quantities which are given to it initially before the algorithm begins.
4. Output :A algorithm algorithm has a or more output results, the quantity that the relationship to be specified with the input.
5. Effectiveness:Always be sure the algorithm is effective. This mean that all operations performed in the algorithm must be
basic enough that in principle and can be done correctly and over a certain period of time.
- Define criteria to measure a good algorithm. Explain how to measure it with example
Good algorithm algorithms must be secure:

1 Accuracy : Ensure that the calculation result or performance that we want the computer to perform is
accurate

2 Clarity : Algorithms must be expressed in terms of transparency, precision. The reports are arranged in order
and according to a certain logic.

3 Objectivity: Anyone writing and on many computers must produce consistent results.

4 Universality: Algorithms not only apply to a specific problem, but also to problems with similar problems.
Ending: The algorithm must include a finite number of computational steps and must have a stop

- Explain the 7 steps of building an application

1 Identify or Analyze the Problem: Identify problems to address as input requirements, and analyze the program (also known as
the output processing).

2 Design (algorithm): Problem path to step-by-step measure.

3 coding: writing encoding program, program algorithm is expressed through programming language

4 Program Documentation: Compile and run programs, help users understand how the program works and how to use the
program and maintain the program. In addition, it also annotates specific programs, notes part of the program, confusing confusion.

Compiling and Running a Program: Compiling is the process of translating a source program into a language that the machine can
understand and execute
6 Testing and debugging: Check the test program to check for errors, test the program steps to meet the requirements, check the
accuracy and output are the same as the programmer's desire? If the error is still or not

meet the requirements of the problem, then we need to modify it to meet the requirements, it is called debugging.

7 Maintenance: It is the process of maintenance and upgrading of the program to keep up with changes in technology and
requirements

Process

Steps:

-Requiment
+Input: Requests, users, stories, a specific need
+Output: Documents, requirements, matrix
-Design
+Input: Environments, system components
+Output: General design, details, specifications of the program
-Implementation
+Input: System components, implementation plan
+Output: System to work, the environment carried out for testing
-Testing
+Input: Test plan, script list and cases to check
+Output: Issues, defects

-Deployment
+Input: System components and executable code
+Output: Direct system
-Maintenance
+Input: Specifications of the design and specifications of the program
+Output: Source code

M1: Determine the steps taken from writing code to execution.


Step 1 : First code is compiled into MSIL (all C#, J#, etc will be compiled into MSIL).

Step 2 : When the app executes, JIT compiler in the CLR translates MSIL into machine code.

Step 3 : The machine code executes on that platform.


D1: Examine the implementation of an algorithm in a suitable language. Evaluate
the relationship between the written algorithm and the code variant.
The relationship between the written algorithm and the code variant

In the first part of the report, we understand what the algorithm is. Algorithms are steps to solve problems,
helping programmers create a framework of ideas. Based on the input data and the implementation of the
instructions, the algorithm will generate an output data set. Code variants are built on algorithms, and
algorithms often have to build code variants to make it easier for programmers to build the program. Code
Variation is an algorithmic description of general command structures so that we can encode for each program,
different programming languages easily.
Programming paradigms
Define :

Programmatic modeling is derived from structured programming, Based on the concept call procedure, use the
top-down approach. It is based on procedures or subroutines to perform calculations.

Explanation

A procedural programming method divides a large program into functional blocks or functions that are small
enough to be easy to program and test. Each function has a start and end point and has its own data and logic. In
a program system, the variables have a certain visible range. In the program, the functions operate
independently of each other. Data is passed back and forth through function call parameters. The division of
programs into functions allows many people to participate in program development. Each person builds one or
several independent functions. This method leads to a new concept - abstraction.
Abstraction can be seen as the ability to observe an event without considering its internal details. In a
procedural program, we just need to know what a particular function can do. How to do it does not matter, as
long as the function is reliable, it can be used without having to know how it performs properly. This is called
functional abstraction (or specialization) and is the basis of procedural programming.

Example : Total electricity bill of a company

 Algorithms:
 Flowchar:

You might also like