0% found this document useful (0 votes)
85 views

Unit 1 - Assignment 1 Frontsheet

The document outlines an assignment for a programming unit, including: - Details of the student, class, assignment submission dates, and assessor. - The student declares the work is their own and they understand the consequences of plagiarism. - A grading grid is included for assessor feedback. - The assignment requires designing a program to manage accounts for a business using basic functions like top-ups, balance checks, and deductions.

Uploaded by

HD Lee
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
85 views

Unit 1 - Assignment 1 Frontsheet

The document outlines an assignment for a programming unit, including: - Details of the student, class, assignment submission dates, and assessor. - The student declares the work is their own and they understand the consequences of plagiarism. - A grading grid is included for assessor feedback. - The assignment requires designing a program to manage accounts for a business using basic functions like top-ups, balance checks, and deductions.

Uploaded by

HD Lee
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 18

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 Minh Triet Le Student ID GCD19828

Class GCD0901 Assessor name Hoang Nhu Vinh

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

1|Minh Triet
❒ Summative Feedback: ❒ Resubmission Feedback:

Grade: Assessor Signature: Date:

Lecturer Signature:

2|Minh Triet
Table of Contents
A. PROGRAM INTRODUCTION....................................................................................................................5
B. WHAT AN ALGORITHM IS AND OUTLINE THE PROCESS IN BUILDING AN APPLICATION.......................6
I. Overview about Algorithm..................................................................................................................6
II. The process of programming an application.......................................................................................6
C. DESIGN AND ANALYSIS...........................................................................................................................8
I. Programming standards......................................................................................................................8
II. Flowchart, Activity Diagrams...............................................................................................................9
D. IMPLEMENTATION DETAILS AND HOW TO THE PROGRAM’S ACTIVITY..............................................10
I. How Main () function works..............................................................................................................10
II. Software Development Life Cycle and how the source code is compiled and run...........................11
a. Software Development Life Cycle..................................................................................................11
b. How the source code is compiled and run.................................................................................11
I. The function to solve the problem....................................................................................................12
a. Source code....................................................................................................................................12
b. While loop..................................................................................................................................13
c. Switch statement...........................................................................................................................13
E. TESTING AND DEBUG............................................................................................................................15
I. Test plan.............................................................................................................................................15
II. Debug.................................................................................................................................................15
III. Result test......................................................................................................................................15
F. ANALYZATION & EVALUATE..................................................................................................................16
I. Evaluate.............................................................................................................................................16
II. Development plan.............................................................................................................................16
G. REFERENCES..........................................................................................................................................17

3|Minh Triet
Figure 1 Introduction......................................................................................................................................5
Figure 2 Algorithm..........................................................................................................................................6
Figure 3 IF statament......................................................................................................................................8
Figure 4 Functions...........................................................................................................................................8
Figure 5 Flowchart..........................................................................................................................................9
Figure 6 Main function..................................................................................................................................10
Figure 7 Menu Function................................................................................................................................10
Figure 8 The source code is compiled and run.............................................................................................11
Figure 9 The function to problem solving....................................................................................................12
Figure 10 While loop in project....................................................................................................................13
Figure 11 Code and Program of case 1.......................................................................................................13
Figure 12 Code and Program of case 2........................................................................................................13
Figure 13 Code and Program of case 3.........................................................................................................14
Figure 14 Code case 4...................................................................................................................................14
Figure 15 Problem and debug......................................................................................................................15

4|Minh Triet
A. PROGRAM INTRODUCTION
I use C # and Visual studio for programming. The customer requests to create a program that can be
used to support business and has basic functions such as top-up, balance check, and deduction when
using the service.
This program is for those who want to manage account in business. For example, the program can be
used by the business people of restaurants, shops, groceries, ... It is very useful, easy to use for anyone
and can use it in everyday life. This app can be used by many people and it can help people make life

Figure 1 Introduction

easier.

5|Minh Triet
B. WHAT AN ALGORITHM IS AND OUTLINE THE PROCESS IN
BUILDING AN APPLICATION
I. Overview about Algorithm
The algorithm is a finite sequence of operations arranged in a specified sequence so that after
performing that sequence of operations, from the Input of the problem, we get the Output we need to
find.[ CITATION Tuy20 \l 1033 ]
Personally, I define it easily to understand that algorithms are a method to solve a problem. To make it
easier to understand, each problem is like a box containing the results, the answer, and the key to
opening that box is the "algorithm".
Of course each case will always need a different type of key, just like a problem with certain algorithms.
There is no key that can open all the cases, nor is there an algorithm that solves all of the problems.

Figure 2 Algorithm

II. The process of programming an application


 Find out customer needs: Consulting directly from your customers to see what their needs. Must
hit on their interests and interests. From there, build up the challenges your application needs to
address.

6|Minh Triet
 Conceptualizing and detailed sketching: This is the prerequisite and most important step in the
application design process. Based on the content given by the customer, please formulate specific
application design ideas and define a clear direction, save time and ensure product quality.
 Coding: Once all the basics have been prepared, it's time to start programming the design and
finalizing the application. The application design process is based on the needs of the customer.
 Testing: This is an important part when building an application, it is necessary to check whether
the program meets the needs of the customer or not. If the program has errors, proceed to
debug. This process needs to be repeated many times to complete the program.
 Completing the application: Before delivering the application to the customer, it is imperative
that the developer test thoroughly and promptly handle the error Application encountered.
[CITATION Sen20 \l 1033 ]

7|Minh Triet
C. DESIGN AND ANALYSIS
I. Programming standards
Basically a program programmed based on indispensable criteria such as statements and expressions,
functions, libraries
• Statements and expressions
The most common in a computer program is the command. The statement is the smallest independent
unit, of all instructional programming an indispensable part. Each statement will be a request to the
Compiler to perform a certain task.

Figure 3 IF statament

I use the IF statement used to enter the PIN to start the program
• Functions
A function is a group of statements that go together, to perform a task. Each program has at least one
function.

Figure 4 Functions

8|Minh Triet
II. Flowchart, Activity Diagrams

Figure 5 Flowchart

9|Minh Triet
D. IMPLEMENTATION DETAILS AND HOW TO THE PROGRAM’S
ACTIVITY
I. How Main () function works
When starting the program I used the statement "IF" and the goto loop to ask the user to enter the PIN
before starting to use the service. The password are set default at 0901

Figure 6 Main function

If the PIN is correct, the program will display a service menu.


When the PIN is entered correctly, the program will start to operate based on the menu. For the menu-
based program I have created a function that executes for each selection in the menu.

II. Software Development Life Cycle and how the source code is compiled
and run.
a. Software Development Life Cycle
The Software Development Life Cycle (SDLC) is a framework that describes the different phases involved
in software development in order to produce a high-quality product. SDLC periods span the entire life
cycle of a digital application, from conception to retirement.[ CITATION sof21 \l 1033 ]

10 | M i n h T r i e t
Following the SDLC process ensures the software is developed in a structured and disciplined manner.
Purpose:
The aim of the SDLC is to produce a high-quality product that meets the needs of the consumer.
Requirement collection, design, coding, testing, and maintenance are the phases of the SDLC. To have
the Product in a standardized way, it is important to stick to the stages.

b. How the source code is compiled and run.


The method of translation is the conversion to a target language (machine language), so that a program
can understand and perform the process from the high-level langue (C / C ++, Pascal, Java, C # ...). C is a
compiled language for programming. C-written programming that wants to work on a machine must pass
a conversion procedure to translate source to executable code. The method consists of four major
stages:
 Pre-processor
 High-turn language translation phase to Asembly (Compiler)
 Phase translation asembly into machine language (Asember)
 Link stage (Linker)

Figure 8 The source code is compiled and run

11 | M i n h T r i e t
I. The function to solve the problem
a. Source code
This is a function of algorithms to solve problems given by customers. In this function I use "Switch"
statement and while loop for the program to be operated based on menu.

Figure 9 The function to problem solving

12 | M i n h T r i e t
b. While loop
loop While help the program of I have to be back after each time of the task option.

Figure 10 While loop in project

c. Switch statement
Each option on the program corresponds to each case in the source code. Instances contain different
commands and tasks aimed at solving different problems from customer requirements.
Case 1: check the customer's usage score. The account balance is set at 1000 but you can also change it if
you want

Figure 11 Code and Program of case 1

Case 2: load more points for customers.

Figure 12 Code and Program of case 2

13 | M i n h T r i e t
Case 3: Consume points for available services. I use the "If" statement to handle 2 cases
 Success: if your score balance is greater than the number of points spent
 Failure: consumption score exceeds balance

Figure 13 Code and Program of case 3

Case 4: Exit program.

Figure 14 Code case 4

14 | M i n h T r i e t
E. TESTING AND DEBUG
I. Test plan
• First, I check that the menu contains all the requirements from the project. This is a request from
the partner so I have to fulfill all the functions of the program and make sure that each function
must function correctly.
• Next, I need to check the input and output data, this is an important data in the program, so it is
necessary to determine exactly the appropriate declared data types for the most accurate
function of the data type.
• Check the problem solving algorithm
• Finally, check the program exit function that allows users to leave after use.

II. Debug
Problem: in case 2 I discover a problem with entering scores with negative integers
Debugging: I changed the variable declaration from int to uint.

Figure 15 Problem and debug

III. Result test


• The Option menu functioned well, the program did make it back to the menu after each option
and the option 4 did force the problem to end itself.
• The data has been properly stored in each array. The program also accurately calculates the
customer's balance and points of consumption
• The functions are implemented very precisely in the program.

15 | M i n h T r i e t
F. ANALYZATION & EVALUATE
I. Evaluate
Basically, the program has met the requirements and has basically passed the test. The functions have no
errors or errors occurred, but in the case of abnormal data input check this error has been corrected.
However, other functions in the project successfully completed the task, bringing a good experience for
the user
• Advantages of the program
The program is simple and suitable for many users.
Meet the requirements of customers
The functions of completing the task well
• Disadvantages of the program
Still sketchy
Lack of a consumer history function

II. Development plan


I will do the final test of the trial before delivery to the client
In addition, in the future, I will update a more complete program such as adding the consumer history
feature, transferring balance to another account.

16 | M i n h T r i e t
17 | M i n h T r i e t
G.REFERENCES
Anon., March 27, 2021. softwaretestinghelp. [Online]
Available at: https://www.softwaretestinghelp.com/software-development-life-cycle-sdlc/
[Accessed 4 13 2021].
APP, S., 2020. Sapp. [Online]
Available at: https://sapp.vn/blog/quy-trinh-thiet-ke-mobile-app/
[Accessed 12 4 2021].
Tuyensinh247, 2020. Loigiaihay. [Online]
Available at: https://loigiaihay.com/ly-thuyet-bai-toan-va-thuat-toan-trang-32-sgk-tin-hoc-10-
c156a24880.html#:~:text=Thu%E1%BA%ADt%20to%C3%A1n%20l%C3%A0%20m%E1%BB%99t%20d
%C3%A3y,nh%E1%BA%ADn%20%C4%91%C6%B0%E1%BB%A3c%20Output%20c%E1%BA%A7n%20t
%C3%ACm.&text=%2D%20B%C3%A
[Accessed 11 4 2021].

18 | M i n h T r i e t

You might also like