You are on page 1of 12

Higher Nationals in Computing

Unit 1: Programming
ASSIGNMENT 1

Learner’s name: Nguyễn Xuân Trường


ID: GCS17415
Class: GCS0902
Subject code: 1618
Assessor name: PHAN MINH TAM

Assignment due: Assignment submitted:


ASSIGNMENT 1 FRONT SHEET
Qualification BTEC Level 5 HND Diploma in Computing
Unit number and title Unit 1: Programming
Submission date Date Received 1st submission
Re-submission Date Date Received 2nd submission
Student Name Nguyễn Xuân Trường Student ID GCS17415

Class GCS0902 Assessor name Phan Minh Tam

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 D1
❒ Summative Feedback: ❒ Resubmission Feedback:

Grade: Assessor Signature: Date:

Signature & Date:


ASSIGNMENT 1 BRIEF
Qualification BTEC Level 5 HND Diploma in Computing

Unit number and Title Unit 1: Programming

Assignment title Problem solving with algorithms

Academic Year

Unit Tutor

Issue date Submission date

Submission Format:
Format: The submission is in the form of an individual written report and a presentation. This should
be written in a concise, formal business style using single spacing and font size 12. You are
required to make use of headings, paragraphs and subsections as appropriate, and all work
must be supported with research and referenced using the Harvard referencing system.
Please also provide a bibliography using the Harvard referencing system.
Submission Students are compulsory to submit the assignment in due date and in a way requested by
the Tutors. The form of submission will be a soft copy in PDF posted on corresponding
course of http://cms.greenwich.edu.vn/
Note: The Assignment must be your own work, and not copied by or from another student or from
books etc. If you use ideas, quotes or data (such as diagrams) from books, journals or other sources, you
must reference your sources, using the Harvard style. Make sure that you know how to reference
properly, and that understand the guidelines on plagiarism. If you do not, you definitely get fail
Assignment Brief and Guidance:
Scenario: You have applied for a post as a trainee with a software development company and have been invited for an
interview. You have been asked to demonstrate your problem solving and basic programming skills. To do this you have to
prepare a report on using algorithms to solve problems.

You need to explain, using examples, how algorithms are used to solve simple business problems and the steps needed to be
followed to produce a working program solution. You should make clear your assumption about your program. The problems
to be solved will involve basic procedural programming instructions - sequence instructions (input, output and assignment
statements), loops, conditional statements. Problems should be analysed and designed by the use of flowchart and
demonstrated by the use of modules (procedures) using a menu based program.

Tasks:
1. State your simple business problems to be solved.
2. Analyse the problem and design the solutions by the use of suitable methods.
3. Demonstrate the compilation and running of a menu-based program
4. Evaluate how the problem is solved from the designed algorithm to the execution program written by a specific
programming language.

You also need to do a presentation of your work (it should be summary of your report).

Learning Outcomes and Assessment Criteria


Pass Merit Distinction
LO1 Define basic algorithms to carry out an operation and outline the process of programming an application
P1 Provide a definition of what an M1 Determine the steps taken from D1 Examine the implementation of
algorithm is and outline the writing code to execution. an algorithm in a suitable language.
process in building an application. Evaluate the relationship between
the written algorithm and the code
variant.
Table of Contents
Table of Contents
Unit 1: Programming ASSIGNMENT 1......................................................................................................................1
Algorithm................................................................................................................................................................ 1
1. Definition.....................................................................................................................................................1
2. Usage...........................................................................................................................................................1
3. Example.......................................................................................................................................................1
3.1. Flow Chart...........................................................................................................................................1
3.2. Pseudo code........................................................................................................................................2
Building an application............................................................................................................................................2
Step 1: Planning and Requirement......................................................................................................................2
Example...........................................................................................................................................................2
Step 2: Defining Requirements............................................................................................................................2
Example...........................................................................................................................................................2
Step 3: Designing the Product Architecture........................................................................................................2
Example...........................................................................................................................................................2
Step 4: Building or developing the product.........................................................................................................2
Example...........................................................................................................................................................3
Stage 5: Testing the product...............................................................................................................................3
Test 1: 1+2 we know makes 3..........................................................................................................................3
Test 2: 2+6 we know makes 8..........................................................................................................................3
Test 3: 4+5 we know makes 9..........................................................................................................................3
Stage 6: Deployment in the market and Maintenance........................................................................................4
Source code:............................................................................................................................................................4
REFERENCES............................................................................................................................................................5
ASSIGNMENT 1 ANSWERS

P1. Provide a definition of what an algorithm is and outline the process in building an application.

Algorithm
1. Definition
An algorithm is a set of mathematical instruction to solve a given problem usually given to a
computer. Its purpose is to be followed (like a recipe) to reach a given objective to solve the
problem.
2. Usage
There is an infinite amount of use case for an algorithm, any given problem solved with though
processes needing mental effort (calculation, memory, learning) needs an algorithm.
A few concrete examples could be:
- Calculating the profits of a company in the business department
- Managing stock in a warehouse in the logistics department
- Determining new/faster ways of achieving a goal in the research department

3. Example
We can illustrate this by programming an algorithm to add 2 numbers
3.1. Flow Chart

Page |1
3.2. Pseudo code
Step 1: START
Step 2: Read a
Step 3: Read b
Step 4: SUM = a + b
Step 5: Print SUM
Step 6: END
Building an application
Step 1: Planning and Requirement
This is one of the fundamental steps in building an application. It is at this point that the basic project
approach is laid out. All the feasibility of the technical, economical and operational aspect of the
application. This process is also helped by the customer, and overall information on the market and
targeted audience.
Example
We will first have to find a problem or a reason that we will start the building of an application. In our
case, the problem is that we need the result 2 number given by the user.
Step 2: Defining Requirements
In this this stage we must clearly define the requirements of the product and what it will do. We must
also describe the functionality of the product, in other words, what needs are fulfilled.
Page |2
Example
Our application will be able to add 2 numbers together and print out the result. It fulfills the need of
adding 2 numbers together.
Step 3: Designing the Product Architecture
This stage is for planning the architecture of the application. Based on the requirements, designs are
proposed and documented. All the people involved review this part and following multiple different
factors, the best architecture is chosen. It should lay out the calendar for building the application,
what we will need to reach the objective and a brief description of the application.
Example
The user interface consists only of 2 input spaces corresponding to the 2 numbers to add. After that
there is an out put on the 2 added numbers.
Step 4: Building or developing the product
We finally start developing and implementing all the product’s features. It is here that we provide
detail for the type of language used, what application to generate the code is used…
Example
To build our algorithm and come to a working program that will be able to solve our problem we will
use Microsoft Visual Studio Code 2019 edition and we will code in C# it is a descendant of C and C++
and is very versatile in most domains.
Stage 5: Testing the product
In our testing phase we will run the application 3 times with numbers that we already know the result
of the addition.
Test 1: 1+2 we know makes 3
We input 1 for a and 2 for b:

The result is 3:

Test is complete and valid


Test 2: 2+6 we know makes 8
We input 2 for a and 6 for b

Page |3
The result is 8:

Test is complete and valid

Test 3: 4+5 we know makes 9


We input 4 for a and 5 for b

The result is 9

Test 3 is complete and valid


Stage 6: Deployment in the market and Maintenance
In this stage we release the product to the public and based on feedback enhancements are implemented. Then
finally maintenance for the customers relating to the product.

Source code:
#include <iostream>
using namespace std;
int main()
{
int a,b;
cout<<" nhap a = ";
cin>>a;
cout<<" nhap b = ";
cin>>b;
cout<<" ket qua a+b = "<<a+b;
return 0;
}

Page |4
REFERENCES

Wikipedia, (2021). Algorithm. [online] Available at


https://en.wikipedia.org/wiki/Algorithm#:~:text=Algorithms%20are%20always%20unambiguous
%20and,language%20for%20calculating%20a%20function. [Accessed 21 January, 2021]

 Radwan, A (2018). ‘what are the applications of different algorithms?’. Available at:
https://www.quora.com/What-are-the-applications-of-different-algorithms [Accessed 21 January,
2020]
 Educba (2020). Introduction to Algorithm.[online] Available at
https://www.educba.com/introduction-to-algorithm/. [Accessed 21 January, 2021]
 Varshneya, R (2019). ‘A step-by-step guide to building your first mobile app’. [online] Entrepreneur.
Available at: https://www.entrepreneur.com/article/231145. [Accessed 21 January, 2021]
 Amine S, (2017). ‘What is the process for building an application from the idea to sucecessful
application?’. [online] Quora. Available at: https://www.quora.com/What-is-the-process-for-
building-an-application-from-the-Idea-to-successful-application. [Accessed 21 January, 2021]
 Liquid State (2017). How to Build an App: The Process Behind App Development. [online] Available
at: https://liquid-state.com/the-process-behind-app-development/. [Accessed 21 January, 2021]
 Tutorialspoint
https://www.tutorialspoint.com/sdlc/sdlc_overview.htm
https://www.perforce.com/blog/alm/how-write-software-requirements-specification-srs-
document#:~:text=A%20software%20requirements%20specification%20(SRS)%20is%20a
%20document%20that%20describes,A%20purpose
https://www.toptal.com/freelance/why-design-documents-matter

Page |5

You might also like