Professional Documents
Culture Documents
HND - Programming Assignment Batch08
HND - Programming Assignment Batch08
Assignment Brief
Student Name /Cinec Reg No B.H.K. Janindu Bhanuka /M19981124006
Edexcel No
Student Declaration
I hereby, declare that I know what plagiarism entails, namely, to use another’s work and to
present it as my own without attributing the sources in the correct form. I further understand
what it means to copy another’s work.
1. A cover page or title page should be attached to your assignment. Use page 1 of this assignment
brief as your cover page and make sure all details are accurately filled.
2. The entire assignment brief should be attached as the first section of your assignment report.
3. The assignment report should be prepared using a word processing software. (A4 Sized paper)
4. Allow 1” margin on top, bottom and right sides of the paper and 1.25” on the left side (for
binding).
1. The font size (Body text) should be 12 point, and should be in the style of Time New Roman.
2. Set line spacing to 1.5.
3. Justify all paragraphs.
4. Ensure that all headings are consistent in terms of size and font style.
5. Use footer function on the word processor to insert your name, unit, assignment no, and
page number on each page. This is useful if individual sheets get detached from the
submission.
6. Use the spell check and grammar check function of the word processing application to review
the use of language on your assignment.
Important Points:
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 D1 Examine the implementation of an
algorithm is and outline the from writing code to algorithm in a suitable language.
process in building an application. execution. Evaluate the relationship between the
written algorithm and the code
variant.
LO2 Explain the characteristics of procedural, object-orientated and event-driven programming, conduct
an analysis of a suitable Integrated Development Environment (IDE)
P2 Give explanations of what M2 Analyze the common D2 Critically evaluate the source code
procedural, object-orientated and features that a developer has of an application which implements
event-driven paradigms are; their access to in an IDE. the programming paradigms, in terms
characteristics and the relationship of the code structure and
between them. characteristics.
P3 Write a program that M3 Use the IDE to manage D3 Evaluate the use of an IDE for
implements an algorithm using an the development process of development of applications
IDE. the program. contrasted with not using an IDE.
LO4 Determine the debugging process and explain the importance of a coding standard
P4 Explain the debugging process M4 Evaluate how the D4 Critically evaluate why a coding
and explain the debugging debugging process can be standard is necessary in a team as well
facilities available in the IDE. used to help develop more as for the individual.
secure, robust applications.
P5 Outline the coding standard you
have used in your code.
Written Report (covering all the relevant areas of Task 01 to Task 04)
Executable version of the application you develop in Task 03
Source code of the application you develop in Task 03
Task 1
1.1 What is an algorithm? Give the definition. Provide an example for an algorithm using
pseudocode. (Task covers LO1, P1)
1.2 Briefly describe the steps you should follow to implement a software. (Task covers LO1,
P1)
Hint: Use SDLC to describe the steps
1.3 What is the purpose of using pre-processer, compiler and interpreter? Explain your
answer with steps taken from writing code to execution of a program. (Task covers LO1,
M1)
1.4 Evaluate the difference between algorithm and the code. Use suitable examples to
evaluate your answer (Task covers LO1, D1)
Task 2
2.1 Explain procedural, object oriented and event driven programming paradigms. Your
explanations should also include the characteristics of each. (Task covers LO2,P2)
2.2 Describe the relationship between procedural, object oriented and event driven
paradigms. (Task covers LO2, P2)
2.3 Explain what an Integrated development environment (IDE) is. Also explain the
features of the three (03) IDEs. (Task covers LO2, M2)
Task 3
You should be able to implement a system according to the given scenario.
The manager of a computer hardware desired to have a fully working application (Desktop
application) to maintain inventories in the shop. Following are the functions he requested
for the system.
Once a customer wants to buy an item, manager can select that item from the list and
then it will load the order page where the manager can enter customer details and
order details.
If the customer does not have enough money to buy that item, he can make an
advance payment and book that item. Then the system will display the balance.
To implement above system, you need to create a database and add tables as bellow.
Table name: Customer
CustomerName
Address
Contact Number
3.1 Use an Integrated Development Environment (IDE) of your choice to implement the
above mentioned application. Include source code and screen shots of the application.
(Task covers LO3, P3)
3.3 What are the advantages of using IDE to implement such a system rather than not using
an IDE. (Task covers LO3, D3)
Task 4
4.1 Briefly describe the debugging process. (Task covers LO4, P4)
4.2 What are the coding standards you have used when develop the application in task 03?
(Task covers LO4, P5)
4.3 Do an evaluation of the debugging process in the IDE you used focusing on how it helped
with the development of your application. You may discuss both positives as well as
negatives (if any) (Task covers LO4, M4)
4.4 Critically evaluate why a coding standard is necessary for implementation? (Task covers
LO4, P5,D5)
4.5 Critically evaluate the source code that you wrote for the application in Task 03 in
procedural, object orientated and event-driven programming viewpoints, paying
attention to the code structure and characteristics. (Task covers LO2, D2)
:End of Tasks
Assignment Feedback
Action Plan
Summative feedback
Program:
HND in Computing
Unit:
01- Programming
Plagiarism
Plagiarism is a particular form of cheating. Plagiarism must be avoided at all costs and students who break the
rules, however innocently, may be pena. It is your responsibility to ensure that you understand correct
referencing practices. As a university level student, you are expected to use appropriate references throughout
and keep carefully detailed notes of all your sources of materials for material you have used in your work,
including any material downloaded from the Internet. Please consult the relevant unit lecturer or your course
tutor if you need any further advice.
Student Declaration
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.
Also, in preparing for this project, I could not complete it without the support of my
batch mates. They always direct me to create this project successfully.
My sincere thanks also go to my dearest parents for giving me valuable advice and for
giving me their maximum support to complete this project.
Finally, I would like to say Thank you to the unmentioned people who have guided
me, directly and indirectly, to write this project successfully.
Figure 1 Acknowledgement
Since 1975, the digital revolution started. As a result of this digital revolution humans began
to use information technology for make their daily works easier than earlier. So, they invented
many technological equipments to the modern world such as computer, smart phone….These
technical equipments which are based on the information technology are control by a code
based program. In that smart devices, some code programs are running in the device
background. When we press a key, when we move the mouse cursor likewise every single
simple task has code instructions to execute the tasks. Now you may wondering what is this
coding means.
Coding or programming is a method to instruct the computers to carry out the assigned tasks.
So, a computer program is a set of instructions that the computer executes. Now, you know
the meaning of coding.
Every machine have their own language as our mother language. In machines, it is called the
machine language. Machine language is consist with only two states. They are 1 for on and 0
for off. But the thing is humans cannot understand this machine language. They want to build
up a language which can understand by both human and machines. As a result of this, humans
invented the programming languages and translators.
Programming languages are used to make computer programs in human language and
translators are used to convert that program into machine language. This is how people build
up computer programs to make their daily work much easier.
So, we will go through some main aspects in programming subject with a small project in this
assignment.
Pseudo Codes
Pseudo code is an informal, non-programming language which is describe the steps of an
algorithm in simple way. Also, it represents the implementation process of any algorithm but
it does not include in detail facts.
Also, there are some special words called as variables to store information about the values
of the computer program.
Ex-: Integer - Numbers (1, 2, 3, 4, 5……)
String - Nouns (“apple”, “car”, “bed”…..)
Char - Characters (@, *, #.....)
Double / Float - Decimal Numbers (1.2, 2.5, 5.88, 8.9977…)
1) Question 01…..
Get the total of two numbers.
Answer 01……
Start
Integer num1, num2, Total
Input num1, num2
Total = num1 + num2
Print Total
End
2) Question 2…….
Get numbers between 1 to 10.
Answer 02……
Start
X=0
While X<10 do
Input number
Print Number
X=X+1
End While
End
Figure 5 SDLC
6. Deployment
This is the sixth step of the software development life cycle. In this stage the
team will finalize the project. The senior members check the assigned tasks are
Software Development Life Cycle Model is a formal and clear description which is
represented the software development life cycle. There are eight models.
Waterfall Model
V-Shaped Model
Prototype Model
Spiral Model
Preprocessor
A preprocessor is a program that measures its input to process output that is contribute to
another program as an input. The output is supposed to be a preprocessed type of the
information, which is regularly used by some resulting programs like compilers. The amount
and the processing type is based on the nature of the preprocessor. Preprocessor is a system
software. It converts the high level language into the machine level language.
To run a computer program we have two ways. It is compiling the program and pass the
program via an interpreter.
Compiler
Compiler is a computer software program which converts the high level language which is
written by a programmer into machine language which can identify by the computer processor
without changing the purpose of the source code. There are three types of compilers. They
are single pass compilers, two pass compilers & multiple pass compilers.
Interpreter
Interpreter is software program which execute the instructions of a program that written in a
high level language.
We have to get the total of two numbers. We get three variables to execute the program. We
get A as the first number. We get B as the second number. We get C as the answer of the total
of two numbers. Then we assign values for each variable. This can describe as follows.
Line 1 A = 100;
Line 2 B = 200;
Line 3 C = A + B;
Line 4 Display (C);
First of all, the interpreter scan the first line of the source code and generate the first
line into machine code. Then interpreter scan the second line of the source code and generate
the second line into machine code. After that, the interpreter scan the third line of the source
code and generate the third line into machine code. Finally, the interpreter scan the fourth line
of source code and generate the fourth line into machine code. If any issue in the source code
the interpreter will display it as an error massage. Also if any line has an issue it will not
continue the execution process. After fixing the issues, compiler will run the program. The
computer show the output as “300” as we wish.
Procedural Programming
Procedural programming is a programming method which is divide the main large
program into sub units called procedures. Any new programmer will learn this paradigm in his
first step of programming. In this method the computer will instruct the code how to complete
the assign task in completing the small steps because this paradigm is based on the top to
bottom concept. The large program is at the top level and its divided parts are at the bottom.
By completing this all sub units we can archive the task. For example, imagine there is a small
program which have 10 line instructions. When we run this program, the computer will execute
the first line and then the second line likewise it continues to line ten. The computer cannot
skip the lines it should execute line by line as the sequence order of the program. So, the
procedural programming is best to develop a medium size applications. There are two types of
data used in the procedural programming. They are local data and global data. Local data
always in the function and the global data is always at the outside of the function. In procedural
programming it used “Cobol, Forton, C, Pascal, Basic” as the programming languages.
1. If we forget to save our code all the unsaved changes are saved in the text editor of the IDE.
2. The compiler will convert the source code into a machine language which can understand
by the computer.
3. The linker will opens the object file of the program and then linker links that file with the
library object files.
4. The loader will load the executable file into the computer memory and the loader inform the
CPU of the computer to process the instructions.
Disadvantages of IDE
Some IDEs can be complex to beginners.
IDE will not eliminate efficiency in our application.
Task 03
Task 3.1 Source Code of the Project
The Screenshots of the source code are include in the source code file.
Task 04
Task 4.1 Debugging Process
Debugging is a systematic and multistep process to identify and eliminate the errors or the
issues or the bugs of the code to design stable and error free software to the customer. Software
needs to stable and error free before it going to the market. Debugging is not a simple task it is
a complex task. Sometimes debugging process task takes more time than the coding time. We
use debugging tools such as Radare2, WinDbg, Valgrind to identify the errors. We must
properly study the whole system for larger duration because to get complete idea of the whole
system. This thing is help to debugger to made different views of systems to be debugging
based on the need.
2. Naming Conventions
In this standard, the naming conventions are designed to express any kind of object in
the software. This standard provide a common structure of the variable names.
3. Contents of Headers
Each module has a pre-defined format of data that should be in the header. This
normally includes the module name, created data, approval date, developer or author name,
summary, module description, module defined variables and functions.
description.
If we run our program without considering the errors there is other way to find our
errors. When we press the run button, the description of the error will show in red color words
at the bottom of the IDE. It displays the small description about the error and the error code
Preprocessor
Preprocessor (2013). Available at: https://en.wikipedia.org/wiki/Preprocessor
(Accessed: 14 January 2021).
C - Preprocessors - Tutorialspoint
C - Preprocessors - Tutorialspoint (2021). Available at:
https://www.tutorialspoint.com/cprogramming/c_preprocessors.htm (Accessed: 14
January 2021).
IDE?, W.
IDE?, W. (2021) What Is IDE? What Are The Advantages And Disadvantages Of
IDE? - Blurtit, Business-finance.blurtit.com. Available at: https://business-
finance.blurtit.com/109106/what-is-ide-what-are-the-advantages-and-disadvantages-
of-ide (Accessed: 17 January 2021).
What is debugging?
What is debugging? (2021). Available at:
https://searchsoftwarequality.techtarget.com/definition/debugging (Accessed: 21
January 2021).