Programming

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 37

Higher Nationals

Internal verification of assessment decisions – BTEC (RQF)


INTERNAL VERIFICATION – ASSESSMENT DECISIONS
Programme title Programming

Assessor Internal Verifier

Unit(s)

Assignment title Design & Implement a GUI based system using a suitable Integrated
Development Environment
Student’s name
List which assessment criteria Pass Merit Distinction
the Assessor has awarded.

INTERNAL VERIFIER CHECKLIST


Do the assessment criteria awarded match
those shown in the assignment brief? Y/N
Is the Pass/Merit/Distinction grade awarded
justified by the assessor’s comments on the Y/N
student work?
Has the work been assessed
Y/N
accurately?
Is the feedback to the student:
Give details:
• Constructive?
• Linked to relevant assessment criteria? Y/N
• Identifying opportunities for Y/N
improved performance? Y/N
• Agreeing actions? Y/N
Does the assessment decision need
Y/N
amending?

Assessor signature Date

Internal Verifier signature Date


Programme Leader signature (if required) Date
Confirm action completed
Remedial action taken

Give details:
Assessor signature Date

Internal Verifier
Date
signature
Programme Leader
Date
signature (if required)

Unit 01 – Programming Assignment 01 1


Higher Nationals - Summative Assignment Feedback Form
Student Name/ID
Unit Title
Assignment Number Assessor
Date Received 1st
Submission Date
submission
Date Received 2nd
Re-submission Date
submission

Assessor Feedback:
LO1. Define basic algorithms to carry out an operation and outline the process of programming an application.
Pass, Merit & Distinction P1 M1 D1
Descripts

LO2. Explain the characteristics of procedural, object-orientated and event-driven programming, conduct a
analysis of a suitable Integrated Development Environment (IDE).
Pass, Merit & Distinction P2 M2 D2
Descripts
LO3. Implement basic algorithms in code using an IDE.
Pass, Merit & Distinction P3 M3 D3
Descripts
LO4. Determine the debugging process and explain the importance of a coding standard.
Pass, Merit & Distinction P4 P5 M4 D4
Descripts

Grade: Assessor Signature: Date:

Resubmission Feedback:

Grade: Assessor Signature: Date:

Internal Verifier’s Comments:

Signature & Date:

* Please note that grade decisions are provisional. They are only confirmed once internal and external moderation has taken place and
grades decisions have been agreed at the assessment board.

Unit 01 – Programming Assignment 01 2


Pearson Higher Nationals in
Computing
Unit 01: Programming
Assignment 01

Unit 01 – Programming Assignment 01 3


General Guidelines
1. A Cover page or title page – You should always attach a title page to your assignment. Use
previous page as your cover sheet and be sure to fill the details correctly.
2. This entire brief should be attached in first before you start answering.
3. All the assignments should prepare using word processing software.
4. All the assignments should print in A4 sized paper, and make sure to only use one side printing.
5. Allow 1” margin on each side of the paper. But on the left side you will need to leave room
for binging.

Word Processing Rules


1. Use a font type that will make easy for your examiner to read. The font size should be 12
point, and should be in the style of Time New Roman.
2. Use 1.5 line word-processing. Left justify all paragraphs.
3. Ensure that all headings are consistent in terms of size and font style.
4. Use footer function on the word processor to insert Your Name, Subject, Assignment No,
and Page Number on each page. This is useful if individual sheets become detached for any
reason.
5. Use word processing application spell check and grammar check function to help edit your
assignment.

Important Points:
1. Check carefully the hand in date and the instructions given with the assignment. Late
submissions will not be accepted.
2. Ensure that you give yourself enough time to complete the assignment by the due date.
3. Don’t leave things such as printing to the last minute – excuses of this nature will not be
accepted for failure to hand in the work on time.
4. You must take responsibility for managing your own time effectively.
5. If you are unable to hand in your assignment on time and have valid reasons such as illness,
you may apply (in writing) for an extension.
6. Failure to achieve at least a PASS grade will result in a REFERRAL grade being given.
7. Non-submission of work without valid reasons will lead to an automatic REFERRAL. You will
then be asked to complete an alternative assignment.
8. Take great care that if you use other people’s work or ideas in your assignment, you properly
reference them, using the HARVARD referencing system, in you text and any bibliography,
otherwise you may be guilty of plagiarism.
9. If you are caught plagiarising you could have your grade reduced to A REFERRAL or at worst
you could be excluded from the course.

Unit 01 – Programming Assignment 01 4


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 way. I further understand what it means
to copy another’s work.

1. I know that plagiarism is a punishable offence because it constitutes theft.


2. I understand the plagiarism and copying policy of the Edexcel UK.
3. I know what the consequences will be if I plagiaries or copy another’s work in any of the
assignments for this program.
4. I declare therefore that all work presented by me for every aspects of my program, will be
my own, and where I have made use of another’s work, I will attribute the source in the
correct way.
5. I acknowledge that the attachment of this document signed or not, constitutes a binding
agreement between myself and Edexcel UK.
6. I understand that my assignment will not be considered as submitted if this document is not
attached to the attached.

Student’s Signature: Date:


(Provide E-mail ID) (Provide Submission Date)

Unit 01 – Programming Assignment 01 5


Higher National Diploma in Computing
Assignment Brief

Student Name /ID Number

Unit Number and Title Unit 01: Programming

Academic Year 2017/18

Unit Tutor

Assignment Title Design & Implement a GUI based system using a suitable
Integrated Development Environment

Issue Date

Submission Date

IV Name & Date

Submission Format

This submission will have 3 components


1. Written Report

This submission is in the form of an individual written report. 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. (The recommended word count is 1,500–2,000 words for
the report excluding annexures)

2. Implemented System (Software)

The student should submit a GUI based system developed using an IDE. The system should
connect with a backend database and should have at least 5 different forms and suitable
functionality including insert, edit and delete of main entities and transaction processing.
3. Presentation

With the submitted system student should do a presentation to demonstrate the system that was
developed. Time allocated is 10 to 15 min. Student may use 5 to 10 PowerPoint slides while doing
the presentation, but live demonstration of the system is required. Evaluator will also check the
ability to modify and debug the system using the IDE.

Unit 01 – Programming Assignment 01 6


Unit Learning Outcomes:

LO1. Define basic algorithms to carry out an operation and outline the process of
programming an application.

LO2. Explain the characteristics of procedural, object-orientated and event-driven


programming, conduct an analysis of a suitable Integrated Development
Environment (IDE).

LO3. Implement basic algorithms in code using an IDE.

LO4. Determine the debugging process and explain the importance of a coding
standard

Unit 01 – Programming Assignment 01 7


Assignment Brief and Guidance:

Task 1: Define basic algorithms to carry out an operation and outline the process
of programming an application (LO1)

Searching on an array/list is to find a given element on the array and return


whether it is found or not and return its position if found. Linear search and binary
search are two popular searching algorithms on arrays.

1.1 Define what an algorithm is and outline the characteristics of a good


algorithm. Develop algorithms for linear search and binary search using
Pseudo code (P1).

1.2 Describe the steps involve in the process of writing and executing a program.
Take an array of 10 or more elements and dry run the above two algorithms.
Show the outputs at the end of each iteration and the final output (M1).

1.3 Define what Big-O notation is and explain its role in evaluating efficiencies of
algorithms. Write the Python program code for the above two algorithms and
critically evaluate their efficiencies using Big-O notation (D1).

Task 2: Explain the characteristics of procedural, object-orientated and event-


driven programming, conduct an analysis of a suitable Integrated Development
Environment (LO2).

2.1 Define what is meant by a Programming Paradigm. Explain the main


characteristics of Procedural, Object oriented and Even-driven paradigms and
the relationships among them (P2).

2.2 Analyze the features of an Integrated Development Environment (IDE) and


explain how those features help in application development (M2).

2.3 Write small snippets of code as example for the above three programming
paradigms using a suitable programming language(s) and critically evaluate
their structure and the characteristics (D2).

Ayubo Drive is the transport arm of Ayubo Leisure (Pvt) Ltd, an emerging travel &
tour company in Sri Lanka. It owns a fleet of vehicles ranging from cars, SUVs to
vans.

The vehicles that it owns are hired or rented with or without a driver. The tariffs
are based on the vehicle type. Some of the vehicle types that it operates are, small
car, sedan car, SVUs, Jeep (WD), 7-seater van and Commuter van. New vehicle
types are to be added in the future.

Unit 01 – Programming Assignment 01 8


Vehicle rent hire options are described below.

1. Rent (With or without driver) – For each type of vehicle rates are given per
day, per week and per month. Rate for a driver also given per day. Depending
on the rent period the total rent amount needs to be calculated. For example:
if a vehicle is rented for 10 days with a driver, total amount to be calculated as
follows:

Total rent = 1_week_car_rent + 1_day_rent x 3 + 1_day_driver_rent x 10

2. Hire (with driver only) – These are based on packages such as airport drop,
airport pickup, 100km per day package, 200km per day package etc. Standard
rates are defined for a vehicle type for a package type that is applicable for
that type of vehicle. For each package maximum km limit and maximum
number of hours are also defined. Extra km rate is also defined which is
applicable if they run beyond the allocated km limit for the tour. For day tours
if they exceed max hour limit, a waiting charge is applicable for extra hours.
Driver overnight rate and vehicle night park rate also defined which is
applicable for each night when the vehicle is hired for 2 or more days.

Task 3: Implement basic algorithms in code using an IDE (LO3).

3.1 Design suable algorithms for vehicle tariff calculation for rents and hires (P3).

Ideally 3 functions should be developed for this purpose as follows:

Function 1: Rent calculation.


Return the total rent_value when rented_date, return_date, with_driver
parameters are sent in. with_driver parameter is set to true or false depending
whether the vehicle is rented with or without driver.

Function 2: Day tour - hire calculation.


Calculate total hire_value when start_time, end_time, start_km_reading,
end_km_reading parameters are sent in. Should return base_hire_charge,
waiting_charge and extra_km_charge as output paramters.

Function 3: Long tour - hire calculation.


Calculate total hire_value when start_date, end_date, start_km_reading,
end_km_reading parameters are sent in. Should return base_hire_charge,
overnight_stay_charge and extra_km_charge as output parameters.

3.2 Implement the above algorithms using visual studio IDE (using C#.net) and
design the suitable database structure for keeping the tariffs for vehicle types

Unit 01 – Programming Assignment 01 9


and different packages which must be used for implementing the above
functions (M3).

3.3 What is the purpose of using an IDE in application development? Evaluate the
use of the Visual Studio IDE for your application development contrasted with
not using an IDE. (D3).

Task 4: Determine the debugging process and explain the importance of a coding
standard (LO4).

Design and build a complete system for the vehicle reservation and billing for
Ayubo drive. This includes the completing the database design started in 3.2
and designing the suitable interfaces for vehicle and package additions and
reservation handling and customer billing (P4).

4.1 What is debugging an application? Explain the importance of the debugging


facility in Visual studio IDE. Debug your source code by putting few debugging
points in your application (P4).

4.2 Implement the above functionalities using the IDE while adopting the coding
standards to improve maintainability of the code. Explain the coding standards
used in your code in the written report (P5).

4.3 Evaluate how you used the debugging process to develop more secure, robust
application with examples (M4).

4.4 Explain the coding standards you have used in your application development.
Critically evaluate why a coding standard is necessary in a team as well as for
the individual. (D4).

Unit 01 – Programming Assignment 01 10


Grading Rubric

Grading Criteria Achieved Feedback

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.

M1 Determine the steps taken from writing code to


execution.

D1 Examine the implementation of an algorithm in a suitable


language. 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 procedural, object orientated,


and event driven paradigms are; their characteristics and the
relationship between them.

M2 Analyze the common features that a developer has


access to in an IDE.

Unit 01 – Programming Assignment 01 11


D2 Critically evaluate the source code of an application which
implements the programming paradigms, in terms of the code
structure and characteristics.

LO3 Implement basic algorithms in code using an IDE.

P3 Write a program that implements an algorithm using an


IDE.

M3 Use the IDE to manage the development process of the


program.

D3 Evaluate the use of an IDE for development of


applications contrasted with not using an IDE.

LO4 Determine the debugging process and explain the


importance of a coding standard

P4 Explain the debugging process and explain the


debugging facilities available in the IDE.

P5 Outline the coding standard you have used in your code.

M4 Evaluate how the debugging process can be used to


help develop more secure, robust applications.

D4 Critically evaluate why a coding standard is necessary in


a team as well as for the individual.

Unit 01 – Programming Assignment 01 12


ACKNOWLEDGEMENT

I have taken a lot of effort in this assignment.

This would not be possible without some individuals.

I would like to extend my sincere

thanks and acknowledge to my tutor,

my dear parents, family

members and my friends.

In addition, I would like to thank everyone

who helped directly or indirectly in

making this assignment a success.

Unit 01 – Programming Assignment 01 13


Table of Contents
Task 01...........................................................................................................................................16
1.1 Algorithm.............................................................................................................................16
Linear and Binary Search.......................................................................................................16
1.2 Process of writing a program...............................................................................................19
Dry Run of Linear Search......................................................................................................20
Dry Run of Binary Search......................................................................................................20
1.3 Big - O Notation...................................................................................................................20
Task 02...........................................................................................................................................21
2.1 Programming Paradigm.......................................................................................................21
Procedural Paradigm..............................................................................................................22
Object Oriented Paradigm......................................................................................................22
Event – Driven Paradigm.......................................................................................................23
Relationships among Paradigms............................................................................................23
2.2 Integrated Development Environment (IDE).......................................................................23
Features of IDE......................................................................................................................23
2.3 Codes for Programming Paradigms.....................................................................................24
Task 03...........................................................................................................................................26
3.1 Algorithms of Rent Calculations.........................................................................................26
3.3 Using IDE in Application Development..............................................................................32
Task 04...........................................................................................................................................33
4.1 Debugging Process...............................................................................................................33
4.2 Coding Standards.................................................................................................................34
4.3 Debugging Develops more Secure and Robust Applications..............................................35

Unit 01 – Programming Assignment 01 14


Task 01

1.1 Algorithm

An algorithm is a process or a set of rules that should be followed when calculating or


performing problem solving operations by a computer.
Basic features of an algorithm can be identified as follows.

1. Finiteness
An algorithm must always terminate after executing a finite number of steps.
2. Effectiveness
An algorithm should be effective which means each step should support an effective
ultimate result.
3. Input/Output
The algorithm receiving an input and producing an output is a good feature.
4. Precision
The steps of the algorithm must be precised.
5. Uniqueness
The output of the algorithm must be unique as it depends on the different inputs.

Linear and Binary Search

These are search methods to find any element in a given array. Two ways can be used in this.

Linear search is the required element is searched in the array from the beginning to the end in a
sequential manner.

Unit 01 – Programming Assignment 01 15


As shown in the above figure, to find ‘J’ the algorithm searches from ‘A’ until the required letter
is found. That is basically the linear search method. This may sometimes cost more time as it
search through each element in the array.

The pseudo code for the above given linear search is as follows.

LinearSearch(a,n,key)
Begin
for i=0 to n do
if a[i]== key then
return i; //Returning the index of the array
end if
end for
return -1;
End.

On the other hand, binary search is a fast algorithm. It is necessary to organize data in a sorted
way for the binary search to execute. It checks the middle term of the array and if it matches
returns the value. If it does not match, it checks whether the required value is less than or greater
than the middle value and proceeds.

Unit 01 – Programming Assignment 01 16


In the figure shown above, ‘7’ is needed to be found. The middle value is ‘14’ and as ‘7’ is
lesser than ‘14’, the algorithm checks the middle term of the values in the left hand side. It is
‘6’ and as ‘7’ is greater than it, algorithm checks the middle term of the values in right hand
side of ‘6’.
So on the procedure carries on until it finds the relevant value. This way is time saving than the
linear search.
The pseudo code relevant to the binary search is given below.

BinarySearch(a,n,key)
Begin
set start = 0, end = n-1, mid = (start + end) / 2;
while (start <= end && a[mid] != key) do
if (key < a[mid]) then
set end = mid-1; //Search in the left half
else

set start = mid+1; //Search in the right half


end
if
set mid = (start + end) / 2;
end while
if (start > end)

Unit 01 – Programming Assignment 01 17


return -1;

Unit 01 – Programming Assignment 01 18


return mid;
End.

1.2 Process of writing a program

Generally when writing a program, several steps should be followed in order to make it fast and
effective. This condition includes for execution of the program too.

1) Identify the problem


This initial step is important as the program is built depending on the facts and
requirements gathered in this step.

2) Design a solution
After the problem is identified, a solution should be designed as a rough sketch or an
organized sketch. Basically it should describe how the program will solve the problem.

3) Draw flowcharts/pseudo codes


This will be effective when the program is properly coded.

4) Write the code using a programming language


Using the flowcharts and sketches drawn previously, the program should be coded to
function properly. It should fulfill the requirements of the customer.

5) Test and debug


The program should be tested and errors must be fixed. For that, blackbox testing, white
box testing, unit testing, integration testing and acceptance testing should be performed.

6) Deployment
The program should be released to the customer with a desired and risk free method of
deployment.

Unit 01 – Programming Assignment 01 19


Dry Run of Linear Search

Input : a = 5,8,10,13,17,23,26,27,31,34,
Input: key =
13 Output i =
4

The output will be the index of the required value or the number. In the above case, output will
be 4 which is the index of the required value 13.

Dry Run of Binary Search

Input : 3,7,9,13,16,19,23,27,29,33,40
Input : key =
23 Output : i =
7

The required value is 23. The binary search finds the middle term and checks it compared to 23.
The middle term is 19 and as it is lesser than 23, the search goes to the middle term of right side
of the array.

1.3 Big - O Notation

Big – O notation is used to describe the performance or the complexity of an algorithm. It also
describes the execution time and the required space about the algorithm as the input grows.
Big- O notation basically has two main areas of applications as in mathematics and computer
science.

Unit 01 – Programming Assignment 01 20


Unit 01 – Programming Assignment 01 21
Task 02

2.1 Programming Paradigm


Programming paradigm is the method of solving problems using programming languages or
different tools and techniques. There are certain strategies that should be followed when using
any programming language. These strategies are known as paradigms.
Paradigms can be divided as follows.

Procedural Paradigm

Procedural programming is a linear approach followed to solve the problems as in paradigms. It


consists of simple series of computational steps that should be executed. Languages used in
procedural programming are Fortran, Cobol, Pascal etc

Object Oriented Paradigm

Object oriented programming is based on the concept of objects. Objects with the meaning
containing data in different attributes. These objects interact with the real world so that the
program can obtain data from them.

Unit 01 – Programming Assignment 01 22


The languages used in object-oriented programming are Python, Java, PHP, Ruby, Perl

etc. Event – Driven Paradigm

Event driven programming is based on the events created by the user. For an example, the
program depends on the action of the user such as selecting an option, clicking a button,
submitting information or typing text in a field. This type of programming is the most popular
in business development side.
This will ensure the customer or the user is interacting or paying any interest with the field.
It is considered best for the graphical user interfaces (GUI).

Relationships among Paradigms

The paradigms have the common aim of designing an effective program ultimately. But the
main difference between procedural and object-oriented programming is the based concept is
different.

2.2 Integrated Development Environment (IDE)

Integrated Development Environment is a software suite used to write and test software
programs. For the development of a software, various tools are needed. With an IDE every kind
of tool is in the pack so the programmer doesn’t need to get each one separately.
This is designed to simplify the development process and minimize coding mistakes.
Some IDE are open source and also there are standalone IDE.

Features of IDE

1. Text editor
Every typical IDE has a text editor either with visual components or a simple interface of
language specific syntax.

2. Debugger
Debugging tools help the programmers to identify the errors before releasing the software.
Debugger creates simulated environments to test the program.

Unit 01 – Programming Assignment 01 23


3. Compiler
Compiler is used to translate programming language into machine language or into a code
that the computer can understand. For a better performance, compiler optimizes the code.

4. Code completion
This feature assists the programmers by inserting or guessing the next proper part of the
code. This will save ample of time for the programmers.

The above mention features are useful in many ways to the programmers when coding. Humans
can definitely make errors though not intentionally. When there are features as mentioned
above, those errors can be avoided and hence a better program can ultimately be created.
Debugger is also a highly useful feature of IDE. When the program is not executing in the
proper way, it is extremely hard to find the errors manually. Since the debugger is included in
IDE, it is easy and fast to find the errors and fix them. Like this, the features in IDE are really
helpful in application development.

2.3 Codes for Programming Paradigms

As described in the above, procedural programming describes step by step instructions to be


done. The following code is a basic and simplest example for procedural programming written
in Pascal.

Begin

Writeln (‘Hello
user’) Writeln
End.
(‘Welcome’)

Unit 01 – Programming Assignment 01 24


Object oriented programming is different from procedural programming as this depends on
object stored in different forms of attributes. Given below is a simple example for object
oriented programming written in Java language.

class simple {
public static void main (String args [] )
{ System.out.println (“Hello Java”);
}
}

Event driven programming is much more complex than procedural and object oriented
programming. Following is an example for event driven programming written with
Asp.Net.

Unit 01 – Programming Assignment 01 25


Task 03

3.1 Algorithms of Rent Calculations

The rent or hire calculations for the vehicle hiring company “Ayubo Drive” should be
implemented along with an interface. The user interface and the coding of the hire calculation
designed by the author are given below.

The login interface of the designed system is given as follows. It is used by the employees of
the company to place an order from a customer.

Unit 01 – Programming Assignment 01 26


Unit 01 – Programming Assignment 01 27
When the details are given to the above interface and rent/hire is clicked it will direct to the
next interface where the rent/hire is calculated and displayed.

Also the data will be sent to the database created along with the customer details.

The next interface is as follows where the calculated rent is displayed.

Unit 01 – Programming Assignment 01 28


All the details given in the above interface are sent to the linked database. The database has
customer table, order table, vehicle table and driver table.

The algorithms given to the buttons to calculate rent or hire are given below.

Function 1 – Rent

private void button1_Click(object sender, EventArgs e)


{
int DayRent = 3000;
int DrivRent =
1000;
int Days = Convert.ToInt32(numericUpDown1.Value);

if radioButton1.Value = "true";
int Rent = DayRent * Days + DrivRent * Days;

int Rent = DayRent * Days;

Function 2
Airport Drop/Pickup

private void button3_Click(object sender, EventArgs e)


{
int Rent = 50 * 20;
}

Unit 01 – Programming Assignment 01 29


100km Package

private void button3_Click(object sender, EventArgs e)


{
int Rent = 25*100 ;
}

200km Package

private void button4_Click(object sender, EventArgs e)


{
int Rent = 25*200 ;
}

3.2 Database Structure

For the system designed above, a database should be implemented to store data of hires or
rents. These data can be retrieved for calculation purposes or whenever needed. Given below is
the database designed by the author.

Unit 01 – Programming Assignment 01 30


Unit 01 – Programming Assignment 01 31
3.3 Using IDE in Application Development

Generally when developing a system, various kinds of tools are used by the developers. An IDE
brings most of the processes as selecting, deploying, integrating and managing all of the
necessary tools together. This integrated toolset is designed to simplify the software
development process and to make it easier.
For the development of the above system Visual Studio IDE was used. Below given are is a
contrast of developing with IDE vs without IDE.

Visual Studio IDE provides windows form designer which is used to build GUI applications.
This feature makes it easier to get an instant view of the interface in progress. Therefore if any
changes are needed they can easily be done at the same instance.
If IDE is not used for the development, above feature cannot be obtained.

Another important feature of the IDE is the debugging process. The coding was easier and
effective because of this debugging feature. The errors can be identified instantly and fixed so
that the program executes properly. This is far more easier than debugging manually. In the
manual process, the programmer should identify and fix the errors himself. That method costs
more time and effort.

Just as described above, with the use of the features provided by the IDE application the
development of the system was easier. Without the use of an IDE it would be a lot difficult.

Unit 01 – Programming Assignment 01 32


Task 04

4.1 Debugging Process

Debugging is a multistep process of identifying problems of a system and either correcting


them or finding a way to make through it. At the final step of debugging it is confirmed that the
system works properly and the desired outcome is obtained.
Sometimes when several subsystems are combined together, debugging can get harder because
any change in one module can cause errors to occur in another module. Therefore debugging
can cause major problems in some occasions.

The importance of debugging as below.

1. Effectively find and eliminate bugs and errors.

2. Ultimately obtain the desired output of the system.

3. Build a reliable and error-free system.

Basically the steps of the debugging are as,

- Detection of the problem

- Identifying a solution

- Fixing the error

- Checking the functionality

The above steps generally repeat until the desired outcome is gained from the system error freely.

Unit 01 – Programming Assignment 01 33


4.2 Coding Standards

Coding standards are a set of guidelines, rules or practices followed by the developers when
coding a system. The coding standards differ from each coding language though every coding
language have some common standards.

Every developer has their unique style of coding that one developer might think easy while the
other thinks it difficult. Therefore to establish a certain standard in coding where every
developer needs to follow, a coding standard is implemented in most of the organizations.

However, it is still in argument whether the coding standards is needed in the first place. The
main reason for this argument is that some skilled developers might find it difficult to get
adjusted to the coding standards and hence it reduces the skill of each individual.
In other words, developers get framed when following the coding standards and the natural skill
of individuals will be of no use.

For a group of developers who work in a structured manner, following the coding standards
will be useful. If a lot of developers are not in interaction, following coding standrds is not
necessary. Many developers dislike to work in the code written by another developer to his own
style. In such cases coding standards are useful.

Some general coding standards used by most of the organizations are explained below.

- Commenting Style
Commenting helps developers to get a clear view of what’s going on in the code. A certain
style should be followed by the developers to comment.

Unit 01 – Programming Assignment 01 34


- Formatting Style
This includes the indentation, font, spacing, maximum line length and bracketing like
convention types. This kind of standard varies from each organization.

- Naming Convention
Naming conventions cover how classes, files, variables, namespaces and everything else in
the code.

- Code construction
This is about the rules to follow when developing a code. Like whether to use “Do-While”
or “Repeat-Until”.

- Language standards
This is the standards of the language used for the coding. (Java, C# etc)

4.3 Debugging Develops more Secure and Robust Applications

When debugging process is done, the application comes out totally without errors or with fever
errors. In that instance the output can be guaranteed correct as the internal processes are clear.

The debugged applications are more secure as there will be no security threats, hacking attacks
or unknown entry points as they are identified and cleared during the process of debugging.

Also the system will be stronger and robust to withstand an attack or security breach as the best
suitable solutions are applied to the identified vulnerabilities. Therefore, it is always
recommended to debug the applications before launching.

Unit 01 – Programming Assignment 01 35


References

Rouse, M. Algorithm [Online] Available from: https://whatis.techtarget.com/definition/algorithm

Kpopoonam. (2016) Algorithm and Its Characteristics. [Online] Available from:


http://bisma.in/algorithm-and-its-characteristics/

Paul, J. Linear Search Algorithm in Java? Example Tutorial. [Online] Available from:
https://www.java67.com/2016/10/how-to-implement-linear-search-in-java.html

Binary Search Algorithm. [Online] Available from: https://www.google.com/search?


q=binary+search&client=firefox-b- d&sxsrf=ACYBGNTQRauzcKqs-
U3F_yEzz3UudW51hw:1570033035519&source=lnms&tbm=isch&sa=X&ved=0ahUKEwjY
mPjq_P3kAhVCAXIKHXINASwQ_AUIESgB&biw=1366&bih=654#imgrc=uaNnME4u_Lpt
BM:

Bell, R. (2009) A Beginner’s Guide to Big O Notation. [Online] Available from: https://rob-
bell.net/2009/06/a-beginners-guide-to-big-o-notation/

Bae, S. (2019) Big O Notation. [Online] Available from:


https://link.springer.com/chapter/10.1007/978-1-4842-3988-9_1

Rani, B. Introduction of programming Paradigms. [Online] Available from:


https://www.geeksforgeeks.org/introduction-of-programming-paradigms/

Procedural Programming. [Online] Available from:


https://www.techopedia.com/definition/21481/procedural-programming

Rouse, M. Integrated Development Environment (IDE). [Online] Available from:


https://searchsoftwarequality.techtarget.com/definition/integrated-development-environment

Unit 01 – Programming Assignment 01 36


Walker, A. (2018) What is an IDE (Integrated Development Environment)?. [Online] Available
from: https://learn.g2.com/ide#ide-features

(2012) Event-Driven Programming. [Online] Available from:


https://hhaggan.wordpress.com/2012/06/08/event-driven-programming/

Petit, D. (2006) Coding Standards and Code Reviews in Visual Studio .NET. [Online] Available
from: https://www.codeproject.com/Articles/13987/Coding-Standards-and-Code-Reviews-in-
Visual-Studio

Hollott, P. (2019) How can the debugging process be used to help develop more secure, robust
applications?. [Online] Available from: https://www.quora.com/How-can-the-debugging-
process-be-used-to-help-develop-more-secure-robust-applications

Unit 01 – Programming Assignment 01 37

You might also like