Uploaded by L.S.P. Liyanage

Programming Sample

advertisement
Higher Nationals
Internal verification of assessment decisions – BTEC (RQF)
INTERNAL VERIFICATION – ASSESSMENT DECISIONS
Programme
title
HND in Computing
Mrs. Shifani Mohideen
Assessor
Internal
Verifier
Unit 1 – Programming
Unit(s)
Assignment
title
Design & Implement a GUI based system using a
Integrated Development Environment
Mohammed Azhar Ameena
Student’s name
List which
assessment
criteria the
Assessor has
awarded.
Pass
Merit
Distinction
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 student work?
Y/N
Has the work been
assessed accurately?
Y/N
Is the feedback to the student:
Give details:
• Constructive?
• Linked to relevant assessment
criteria?
• Identifying opportunities for
Y/N
Y/N Y/N
Y/N
improved performance?
• Agreeing actions?
Does the assessment decision
need amending?
1
Y/N
Assessor signature
Date
Internal Verifier signature
Date
Mohammed Azhar Ameena
Programming
Assignment 01
Remedial action taken
Give details:
Confirm action completed
Assessor signature
Date
Internal Verifier
signature
Date
Programme Leader
signature (if required)
Date
Programme Leader signature (if
required)
2
Mohammed Azhar Ameena
Date
Programming
Assignment 01
Higher Nationals - Summative Assignment Feedback Form
Mohammed Azhar Ameena KAN/A-013805
Student Name/ID
Design & Implement a GUI based system using a suitable Integrated
Development Environment
Unit Title
Assignment Number
01
Mrs. Shifani Mohideen
Assessor
Submission Date
Date Received 1st
submission
Re-submission Date
Date Received 2nd
submission
13/12/2020
Assessor Feedback:
LO1 Define basic algorithms to carry out an operation and outline the process of programming application.
Pass, Merit & Distinction
Descripts
P1
M1
D1
LO2 Explain the characteristic of procedural, object oriented and event driven programming, conduct an analysis of
a suitable Integrated Development Environment (IDE).
Pass, Merit & Distinction
Descripts
P2
M2
D2
LO3 Implement basic algorithms in code using an IDE
Pass, Merit & Distinction
Descripts
P3
M3
D3
LO4 Determine the debugging process and explain the importance of coding standards
Pass, Merit & Distinction
Descripts
Grade:
P4
P5
M4
D4
Assessor Signature:
Date:
Assessor Signature:
Date:
Resubmission Feedback:
Grade:
Internal Verifier’s Comments:
Signature & Date:
3
Mohammed Azhar Ameena
Programming
Assignment 01
* 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.
Assignment Feedback
Formative Feedback: Assessor to Student
Assignment is good but there are some things you need to modify. 2.2 critical evaluation is not
done properly. (11.21.2020)
In 3.3 IDE features are ok, but at the end you have to give a conclusion in your words how IDE
was useful for your system development and if you develop without IDE how it would have
effected. (11.21.2020)
In debugging you have to describe the debugging tools, don’t just say break point elaborate it
what are the tools what’s its advantage etc. likewise for all the tools need to describe and at the
end give a conclusion how you developed a secure system by using these tools. (11.21.2020)
Action Plan
Critically evaluated the programming paradigms in 2.2.
Gave a conclusion on how IDE was useful for the system and how it would have affected
without IDE.
Described the debugging tools.
Gave a conclusion on how system was developed by using debugging tools.
Summative feedback
Feedback: Student to Assessor
4
Assessor
signature
shifani@gmail.com
Date
13/12/2020
Student
signature
kana013805@esoft.academy
Date
13/12/2020
Mohammed Azhar Ameena
Programming
Assignment 01
Pearson Higher Nationals in
Computing
Unit 01: Programming Assignment
01
5
Mohammed Azhar Ameena
Programming
Assignment 01
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 make sure all the details are accurately filled.
2.
Attach this brief as the first section of your assignment.
3.
All the assignments should be prepared using a word processing software.
4.
All the assignments should be printed on A4 sized papers. Use single side printing.
5.
Allow 1” for top, bottom , right margins and 1.25” for the left margin of each page.
Word Processing Rules
1. The font size should be 12 point, and should be in the style of Time New Roman.
2. Use 1.5 line spacing. Left justify all paragraphs.
3. Ensure that all the headings are consistent in terms of the font size and font style.
4. Use footer function in 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 editing your
assignment.
Important Points:
1. It is strictly prohibited to use textboxes to add texts in the assignments, except for the
compulsory information. eg: Figures, tables of comparison etc. Adding text boxes in the body
except for the before mentioned compulsory information will result in rejection of your work.
2. Carefully check the hand in date and the instructions given in the assignment. Late submissions
will not be accepted.
3. Ensure that you give yourself enough time to complete the assignment by the due date.
4. Excuses of any nature will not be accepted for failure to hand in the work on time.
5. You must take responsibility for managing your own time effectively.
6. 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.
7. Failure to achieve at least PASS criteria will result in a REFERRAL grade .
8. Non-submission of work without valid reasons will lead to an automatic RE FERRAL. You will
then be asked to complete an alternative assignment.
9. If you use other people’s work or ideas in your assignment, reference them properly using
HARVARD referencing system to avoid plagiarism. You have to provide both in-text citation
and a reference list.
10. If you are proven to be guilty of plagiarism or any academic misconduct, your grade could be
reduced to A REFERRAL or at worst you could be expelled from the course
.
6
Mohammed Azhar Ameena
Programming
Assignment 01
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 Pearson, UK.
6. I understand that my assignment will not be considered as submitted if this document is not
attached to the attached.
kana013805@esoft.academy
13/12/2020
Student’s Signature:
(Provide E-mail ID)
Date:
(Provide Submission Date)
7
Mohammed Azhar Ameena
Programming
Assignment 01
Higher National Diploma in Computing
Assignment Brief
Student Name /ID Number
Unit Number and Title
Academic Year
Unit Tutor
Assignment Title
Mohammed Azhar Ameena KAN/A-013805
Unit 01: Programming
2020/21
Mrs. Shifani Mohideen
Design & Implement a GUI based system using a suitable
Integrated Development Environment
Issue Date
Submission Date
04/11/2020
13/12/2020
IV Name & Date
Submission Format
This submission will have 3 components
1. Written Report
This submission should be 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. provide in-text citations, reference list and a bibliography using the
Harvard referencing system. (The recommended word count is 2,00–25,00 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 Learning Outcomes:
8
Mohammed Azhar Ameena
Programming
Assignment 01
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
9
Mohammed Azhar Ameena
Programming
Assignment 01
Assignment Brief and Guidance:
Activity 1
Searching on an array/list is to find a given element on the array, 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.
1.2 Convert the algorithms developed in 1.1 to executable programmes using Python and
implement a dry run to evident above the execution of two codes. Show the outputs at the
end of each iteration and the final output. Critically evaluate the efficiencies in implemented
codes using Big-O notation .
Activity 2
2.1 Define what is meant by a Programming Paradigm. Explain the main characteristics of
Procedural, Object oriented and Event-driven paradigms and the relationships among
them.
2.2 Write small snippets of code as example for the above three programming paradigms using
a suitable programming language(s) and critically evaluate the code samples that you have
above in relation to their structure and the unique characteristics
.
10 Mohammed Azhar Ameena
Programming
Assignment 01
Activity 3 and Activity 4 are based on the following Scenario.
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.
Vehicle rent and 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 = weeklyRent x 1 + dailyRent x 3 + dailyDriverCost 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
package type of a vehicle type if 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.
Activity 3
3.1 Design suitable algorithms for vehicle tariff calculation for rents and hires.
Ideally 3 functions should be developed for this purpose as follows:
Function 1: Rent calculation.
Return the total rent_value when vehicle_no, 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 vehicle_no, package_type, 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 parameters.
11
Mohammed Azhar Ameena
Programming
Assignment 01
Function 3: Long tour - hire calculation.
Calculate total hire_value when vehicle_no, package_type, 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 and different packages
which must be used for implementing the above functions.
3.3 Analyze the features of an Integrated Development Environment (IDE) and explain how
those features help in application development. Evaluate the use of the Visual Studio IDE
for your application development contrasted with not using an IDE.
Activity 4
4.1 Design and build a small system to calculate vehicle hire amounts and record them in a
database for customer billing and management reporting for Ayubo drive. This includes the
completing the database design started in 3.2 and implementing one or more GUIs for
vehicle, vehicle type, and package add/edit/delete functions. It essentially requires an
interface for hire calculation and recording function described above. Generating customer
reports and customer invoices are not required for this course work.
4.2 What is debugging an application? Explain the features available in Visual studio IDE for
debugging your code more easily. Evaluate how you used the debugging process to develop
more secure, robust application with examples.
4.3 Explain the coding standards you have used in your application development. Critically
evaluate why a coding standard is necessary for the team as well as for the individual.
12
Mohammed Azhar Ameena
Programming
Assignment 01
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
13
Mohammed Azhar Ameena
Programming
Assignment 01
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.
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.
14
Mohammed Azhar Ameena
Programming
Assignment 01
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.
15
Mohammed Azhar Ameena
Programming
Assignment 01
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.
16
Mohammed Azhar Ameena
Programming
Assignment 01
Acknowledgement
I would like to express my sincere gratitude to Dr.Srilal, head of academic affairs and
Mr.Dimuthu, assistant general manager for providing me an opportunity to do my
learning experience at ESOFT metro campus.
And I acknowledge with thanks the kind of support and timely guidance which I have
received from my lecturer Mrs. Shifani Mohideen. The completion of this undertaking
could not have been possible without the backing and guidance of my lecturer.
Finally I would like to thank to the panel lecturer for guiding me and supporting me
throughout the semester.
Thank you very much!
17
Mohammed Azhar Ameena
Programming
Assignment 01
Table of Contents
Acknowledgement ............................................................................................................. 17
Activity 1............................................................................................................................ 20
1.1 ....................................................................................................................................... 20
What is an Algorithm? ....................................................................................................... 20
How to specify an Algorithm? ........................................................................................... 20
Linear search ...................................................................................................................... 24
Binary search...................................................................................................................... 26
1.2 ....................................................................................................................................... 29
Python code for linear search ............................................................................................. 29
Python code for binary search ............................................................................................ 30
Big-O Notation ................................................................................................................... 31
Algorithm efficiency .......................................................................................................... 32
Efficiency analysis of linear search and binary search ...................................................... 33
Algorithm analysis in Big-O notation ................................................................................ 33
Activity 2............................................................................................................................ 34
2.1 ....................................................................................................................................... 34
Programming paradigm...................................................................................................... 34
Procedural programming.................................................................................................... 34
Characteristics of procedural programming ....................................................................... 35
Object-Oriented Programming (OOP) ............................................................................... 35
Characteristics of OOP....................................................................................................... 35
Event-driven programming ................................................................................................ 36
Characteristics of event-driven programming.................................................................... 36
Difference between object oriented programming and procedural programming ............. 37
Difference between procedural programming and event-driven programming................. 37
2.2 ....................................................................................................................................... 38
Evaluation of programming paradigms .............................................................................. 38
Activity 3............................................................................................................................ 50
3.1 Algorithms for vehicle tariff calculation ...................................................................... 50
3.2 ....................................................................................................................................... 53
18
Mohammed Azhar Ameena
Programming
Assignment 01
Console codes for the algorithms ....................................................................................... 53
Database structure .............................................................................................................. 60
3.3 ....................................................................................................................................... 62
Integrated Development Environment (IDE) ..................................................................... 62
Features of an IDE ............................................................................................................. 63
Features in my C# Visual studio IDE ................................................................................ 63
Overall conclusion ............................................................................................................. 68
Activity 4............................................................................................................................ 68
4.1 GUI s for Ayubo .......................................................................................................... 68
4.2 Debugging .................................................................................................................... 81
Debugging features/tools available in the visual studio IDE ............................................. 81
Overall conclusion ............................................................................................................. 86
4.3 ....................................................................................................................................... 86
Coding standards ................................................................................................................ 86
Importance of coding standards for an individual ............................................................. 88
Importance of coding standards for the team ..................................................................... 88
Advantages of using coding standards as an individual and as a team .............................. 89
Disadvantages of using coding standard as an individual and as a team ........................... 90
Overall conclusion ............................................................................................................. 90
Conclusion for the assignment ........................................................................................... 90
Gantt chart .......................................................................................................................... 91
References .......................................................................................................................... 91
19
Mohammed Azhar Ameena
Programming
Assignment 01
Activity 1
1.1
What is an Algorithm?
Algorithm is a method which depicts a solution to a problem by taking some values as
input in order to get an appropriate output. A correct algorithm solves the given
computational problem. Whereas an incorrect algorithm might stop with an answer other
than the appropriate one. Algorithm can be executed in pseudocode, flowchart and in
programming languages such as python, C#, C etc. The only thing is to provide an
accurate description of the computational procedure to be followed.
(Cormen, et al., 1990)
How to specify an Algorithm?
An algorithm can be specified by a pseudocode, flowchart or using natural language.
Pseudocode
Pseudocode is a non-standard language that helps the programmers to develop an
algorithm. It is a cooked up representation of an algorithm. Pseudocode can be
understood by everyone, it is not a mandatory to have an advanced programming
knowledge. Pseudocode will help the beginners to perform an algorithm in an easy way
by explaining each code of the program. Also makes the programmer to construct the
code easier.
(Jain, n.d.)
Figure 1 Pseudocode
20
Mohammed Azhar Ameena
Programming
Assignment 01
Flowchart
Flowchart is a graphical representation of an algorithm which is used to solve the problem
step-by-step in a substantial manner. This is used as a program-planning tool by the
programmers to solve a problem. Flowchart uses symbols to specify the information.
(Jain, n.d.)
Example,
Finding the area of the circle,
Figure 2 Flowchart
21
Mohammed Azhar Ameena
Programming
Assignment 01
The programming process
1. Analyzing the problem - Initially the problem is defined accurately as to confine
within which the development of the problem is to be done. So, this done by the IPOModel (i.e. Input, Process, Output model). Using this model, the programmer will find
easy to analyze the problem.
2. Task analysis / designing the solution - In this stage, the programmer must come up
with different solutions for the analyzed problem. Same problem can have many
solutions, but the programmer must select the most favorable one. So, there are two
ways of designing the solution, either by drawing a flowchart or writing a pseudocode
or both.
3. Coding the program - The main objective of this stage is to use a suitable
programming language such as Python, C, C#, Java, Pascal etc. The selection of
language is done according to the available resources.
4. Testing and debugging - At this stage, the developed program is tested as to resolve
errors. So, this can be done by translating the program by a compiler or by deskchecking (dry run) the program.
5. Documentation - Once the program is tested and debugged, the programmer must
prepare a suitable document which includes the description of the program, logic tools
such as flowcharts and pseudocode, data record descriptions and testing results. This
should be given to the user who uses the program.
6. Implementation - At this stage, the developed program is installed to the user’s
machine. User can use the program with the help of the provided document. And if
any defect arises, the user can inform this to the programmer. And the programmer
can make changes as per the user’s requirement
7. Maintenance and enhancement - It is the programmer’s responsibility to maintain
the program properly. So, this can be enhanced by including additional capabilities.
And some of the errors can also be detected which were missed during the phase of
testing. After modifying the program, the program again is provided to the user and
the feedback is taken.
(Godse & Godse, 2007-2008)
22
Mohammed Azhar Ameena
Programming
Assignment 01
Characteristics of a good algorithm
It is beneficial to detect the characteristic of an algorithm.

Input: An algorithm must have 0 or more clearly defined input values.

Output: An algorithm must have 1 or more clearly defined outputs.

Clarity: Clarity in a program makes an algorithm easy to read and minimizes the
amount of errors that naturally occurs. Also, it helps the programmers to modify
easily.

Efficiency: The efficiency of an algorithm becomes fundamental when an algorithm is
repeated in a certain time. So, to compute the efficiency of a program we need to
execute the time with respect to the number of input data.

Finiteness: Number of steps must be limited in an algorithm as to run the program
easily.

Language independent: An algorithm must have the ability to execute the instructions
in any of the programming languages.
(Chang, 2003)
(Jaiswal, 2011)
23
Mohammed Azhar Ameena
Programming
Assignment 01
Linear search

This is the fundamental search algorithm often called as sequential search which reads
the array one after the other from top to bottom.

Linear search is mostly used to search an unordered list in which the items are not
arranged.

Linear search is not much used today since it is slower than binary search.
Concept of linear search
Step 1: Tracks the array (starts from the top)
Step 2: If the element is found, it returns the index value
Step 3: If the element is not found, it returns to -1
(Jaiswal, 2011)
Pseudocode
Figure 3 Pseudocode for linear search
24
Mohammed Azhar Ameena
Programming
Assignment 01
Dry run
Table 1 Dry run for linear search (element found)
25
Mohammed Azhar Ameena
Programming
Assignment 01
Table 2 Dry run for linear (element not found)
Binary search
This is the most popular search that works effectively on the sorted lists. Thus, to search
an element into some list, we must make sure that the list is sorted.
Here, the list is divided by halving an array and the item is compared by taking the mid
value of the list. If the search item is found, the location of middle element is returned.
Else, search item is not the array.
(Jaiswal, 2011)
26
Mohammed Azhar Ameena
Programming
Assignment 01
Pseudocode
Figure 4 pseudocode for binary search
27
Mohammed Azhar Ameena
Programming
Assignment 01
Dry run
Table 3 Dry run for binary search (element found)
28
Mohammed Azhar Ameena
Programming
Assignment 01
Table 4 Dry run for binary (element not found)
1.2
Python code for linear search
Figure 5 Python code for linear search
29
Mohammed Azhar Ameena
Programming
Assignment 01
Figure 6 ouput
Python code for binary search
Figure 7 Python code for binary search
Figure 8 output
30
Mohammed Azhar Ameena
Programming
Assignment 01
Big-O Notation
To resolve a computer related problem there will be more than one solution. These
solutions are designed into different ways of algorithm and the programmer chooses the
most convenient solution out of it. So, Big O notation helps the programmer by giving
some basis computing and measuring the efficiency of a specific algorithm. Also, Big-O
notation helps to determine the time taken and space complexity of an algorithm.
(Data, 2009)
Basically big O notation is used to fasten the growth of a running time asymptotically
contained by some constant factors. The running time of big-O is f (n) and is normally
used for asymptotic upper bounds as it can fasten the growth of the running time for large
sizes of input.
(Sal, 2005)
Lists of common asymptotic notations of algorithms in order:

O(1)

O(log n)

O(n)

O(n log n)

O(n2)

O(n3)

O(2n)
Notation
Type
Examples
O(1)
Constant
Hashing
O(log n)
Logarithmic
Binary search
O(n)
Linear
Linear search
O(n log n)
n log(n)
Quick sort
O(n2)
Quadratic
Bubble sort
O(2n)
Exponential
Travelling salesman
Table 5 Notations
31
Mohammed Azhar Ameena
Programming
Assignment 01
Figure 9 Big-O analysis
Algorithm efficiency
The efficiency of an algorithm becomes fundamental when an algorithm is repeated in a
certain time. So, to compute the efficiency of a program we need to execute the running
time with respect to the volume of input data.
Algorithms are divided based on efficiency classes in big-O notation.
Running time (t) ∝ Volume of data (n)
Algorithm Class
Algorithm
Relationship
Big-O notation
between t and n
Class A
Hashing
t∝1
O (1)
Class B
Binary search
t ∝ 𝑙𝑜𝑔2 n
O (𝑙𝑜𝑔2 n)
Class C
Linear search
t∝n
O (n)
Class D
Quick sort
t ∝ n 𝑙𝑜𝑔2 n
O (n𝑙𝑜𝑔2 n)
Class E
Bubble sort
t ∝ n2
O (n2)
Table 6 Algorithm efficiency
32
Mohammed Azhar Ameena
Programming
Assignment 01
Efficiency analysis of linear search and binary search
Linear search
Best Case
1 comparison
Item found the 1st element
Worst Case
N comparisons
Item found on the last element or
searching for non-existing item
Average Case
(n+1)/2 comparison
Average of the above 2
Big-O Notation = O(n)
Table 7 linaear search efficiency
Binary search
Best Case
1 comparison
Item found the 1st middle
element
log 2 n comparisons
Worst case
Searching
for
non-
existing item
Average Case
(log 2 n + 1)/2
Average of the above 2
comparison
Big-O Notation = O (𝐥𝐨𝐠 𝟐 n)
Table 8 binary search efficiency
Algorithm analysis in Big-O notation
Analysis of algorithm emphases on space and time complexity. That is, the space is
required to store information and data, and the time taken by the computer for execution.
Time and space depends on the algorithm and size of input.
Analysis of algorithm based on time and space complexities,
o Best case time complexity
Measures the minimum running time taken by the algorithm for an input size n. The
running time of an algorithm also differs according to the different inputs of the same
size. For example, in some sorted algorithms such as binary search and linear the
running time depends on the ordering of input data. Thus, if the input data is in sorted
order, then it will take the minimum time to perform the operation.
33
Mohammed Azhar Ameena
Programming
Assignment 01
o Average case time complexity
Attains the value for all the possible inputs of size n by averaging the running time of
an algorithm. This is not an accurate case time complexity as it has to presume the
fundamental probability distribution which is violated. So, defining this will be
pointless. Thus, it is difficult to get the precise time taken for execution. And
therefore, time analysis is defined as a function of the input data.
o Worst case time complexity
Measures the maximum time taken by an algorithm for an input size n. The algorithm
performs the n2 operations if the input data items are sent in reverse order for sorting
algorithms which represents the worst case time complexity.
(Group, 2005)
Activity 2
2.1
Programming paradigm
Programming paradigm is the methodology of programming languages which describes the
solution for a problem or to perform a task to a computer using tools and techniques that
are available. There are many programing languages, but all of these programming
languages must follow some methodology when they are performed which is called the
paradigm. (Jain, n.d.)
Some of the programming languages are mentioned below,
Procedural programming
Procedural programming is the oldest programming paradigm based on Von Neumann
architecture which is derived from structured programming based on the concept of return
function, local variables and global variables. Procedural programming executes from top
to bottom. During a program’s execution, any given procedure might be called at any point,
including by other functions or itself. Languages used in procedural programming are
FORTRAN, PASCAL, C, COBOL etc.
(Jain, n.d.)
34
Mohammed Azhar Ameena
Programming
Assignment 01
Characteristics of procedural programming

When a data type is changed by a function, all the other functions are also changed
that process the same data type, thus it consumes time when developing large sized
programs.

Does not match with the real world. For example, a car is an object which moves in
the real world, but procedural programming paradigm concerns only on doing things.

It divides the program into smaller parts known as modules. Modules are pieces of
codes that possess a set of inputs, outputs and processes. Modules divide the program
in such a way that can be easily tested.

Procedural programming can be written using sequence, selection, and repetition
control structures.
(Gondaliya, 2019)
Object-Oriented Programming (OOP)
OOP is a programming paradigm which is established on the concept of objects. Objects
contain unique identities, attributes and set of codes that work in the form of method. OOP
language is mostly based on class. A class is a blueprint that determines a set of similar
objects and their types. Languages used in OOP are Java, Python, Ruby, C# etc.
Characteristics of OOP

Class - A class is a blueprint that determines a set of similar objects and their types. It
can create and represent a set of methods for many objects of the same type. It
consists of data and methods.

Object - An object is the instance of a class. No memory is allocated when a class is
specified, but memory is allocated when an object is created. An object consists of a
unique identity, attributes, and behavior. Objects represents real-life entities, for
example a person can have some attributes like complexion, age, height and behaviors
like eating, sleeping, and walking.

Encapsulation - Is defined as enclosing both data and information within a class.
Variables of data are hidden from other classes and can only be accessed by the
35
Mohammed Azhar Ameena
Programming
Assignment 01
member function of that class. As encapsulation hides data, it is also called as datahiding. (Jain, n.d.)

Inheritance - It is an important concept of OOP as it can derive the properties and
functions from another class. So, when we create a class, it is not necessary to write
all the properties as it inherits from another class that holds. Inheritance permits the
user to use the code again whenever possible and reduces redundancy.

Polymorphism - Polymorphism means having many forms. It is one of the important
characteristic of object oriented programming. Polymorphism can display a message
in more than one form. It allows to perform a single task in many ways. (Jain, n.d.)

Message passing - Is a communication method used by the objects to communicate
with each other by sending and receiving messages. A message is a request to perform
a procedure for an object. Message passing defines the name of the object, function
and information to be passed.

Data abstraction - This is one of the vital characteristic of object oriented
programming which provides only the relevant information of the data to the world by
hiding the other operation.
Event-driven programming
Event-driven is the style of programing language that focuses on events. The flow of
program that is executed depends on events. The model that is based on the event-driven
programming is called as asynchronous model. This programming language depends on
the event loop. Event loop handles all the events in program, by tracing the income and
implementation of events.
Characteristics of event-driven programming

Service oriented - This feature is used to write programs for services. This does not
make the computer slow and consumes less power. Services run in the background of
operating system.

Event handlers - This is a function that handles the events by writing the code when
a specific event is activated. For example, when a user clicks on the button, the
message is displayed and when the user again clicks on the button, will message will
be closed.
36
Mohammed Azhar Ameena
Programming
Assignment 01

Trigger functions - These are the functions that determine the code to be carried out
and used to select which event handler to be used when a specific event is occurred.

Events - Events are the objects that are used to interact with the program such as
mouse, keyboard and user interface. For example a keyboard is used to select a button
whereas a mouse is used to click a button.

Simplicity and ease of development - Event-driven programming is simple and easy
as it helps the programmers to develop the code in a simple way. Even the users find
it easy as it allows to insert a code into an existing application by pausing the code
while it is running.
(Littlewood, 2003)
Difference between object oriented programming and procedural programming
Procedural programming
Object oriented programming
Programs are divided as functions
Programs are divide as objects
Executes from top to down
Executes from bottom to top
Data and functions cannot be added easily
Data and functions can be added easily
Function plays a major role than data
Data plays a major role than function
Does not match with real world
Matches with real world
Examples : FORTRAN, PASCAL, C,
Examples : Java, Python, Ruby, C#
COBOL
Table 9 difffrenece between OOP and procedural programming
(Jain, n.d.)
Difference between procedural programming and event-driven programming
Procedural programming
Event-driven programming
Based on functions
Based on events
Uses sequential, repetition, and selection
Selects user interface for execution
for execution
Examples : : FORTRAN, PASCAL, C,
Examples : Visual Basic and C#
COBOL
Table 10 difference between procedural programmig and event-driven
(Phumbhra, et al., 2005)
37
Mohammed Azhar Ameena
Programming
Assignment 01
2.2
Evaluation of programming paradigms
Procedural programming
Example 1
Figure 10 python code for procedural programming
Figure 11 output
Example 2
Figure 12 python code for procedural programming
Figure 13 output
38
Mohammed Azhar Ameena
Programming
Assignment 01
Figure 14 Output

Selection - This control structure is used to execute the program depending on
whether the condition of an algorithm is true/false, satisfied or not.
So, according to the above example 2, if the avg > = 60, it will print pass and
congratulations.
And if the avg < 60, it will skip the if statement and moves to the else statement and
prints fail and try next time.
Figure 15

Functions - def and print are the functions that has been used for the above coding.
def is used to define a function, and print is used to display the result of the function.
So, according to the example 1, the function that is used is add, the parameters are n1
and n2, and the brackets that are used for the parameters are called as parenthesis.
So, by adding n1 and n2 the total can be displayed.
39
Mohammed Azhar Ameena
Programming
Assignment 01
Figure 16 function
Figure 17 function

Creating a function - def is used to create a function, according to the example given
below, def is used define/create the function add to add the parameters n1 and n2.
Figure 18

Calling a function - Once the function is defined, the function must be called, thus the
return statement is used to call the function by returning back the parameters to the
caller.
Figure 19
Once the function is called, the output is produced as mentioned below,
Figure 20
40
Mohammed Azhar Ameena
Programming
Assignment 01
Object oriented programming
Example 1
Figure 21 python code for OOP
Figure 22 output

Class - A class is also similar to a function like def function, as class definition starts
with class. As shown in the above example, the class that has been created is Student.
And the class name must always start with capital.

Objects - An object is an instance of a class. It has a unique identity, attributes, and
behavior. So according the example the objects are,
41
Mohammed Azhar Ameena
Programming
Assignment 01
Objects can also be methods which corresponds to the function of the class. Methods
are mentioned below,

Message passing – This helps to communicate with one another by passing messages.
Figure 23

Constructor - It is a special method used to initialize variables and display methods.

Self is used to access the attributes and the methods of the class.
42
Mohammed Azhar Ameena
Programming
Assignment 01
Example 2
43
Mohammed Azhar Ameena
Programming
Assignment 01
Figure 24 Output
According to the above example 2,
The class that has been created is Employee
And the instance variables are EmpNo, and EmpName. Instance variables belongs only to
the current instance of the class.
Class variable is common for all the instance. According to the example, the class
variable is EmpCount.
An object is an instance of a class. The below mentioned snippet is the object for the
employee class.
44
Mohammed Azhar Ameena
Programming
Assignment 01
Constructors are also used in here. Constructor is a special function. It has the same name
which the class has. So according to the above example, the constructors are,
Example 3
45
Mohammed Azhar Ameena
Programming
Assignment 01
Inheritance - It has parent class/super class and subclasses/child classes, so according to
the above example the parent class is Employee and the subclass is the SalariedEmployee.
SalariedEmployee inherits all the data from the Employee.
Polymorphism - Polymorphism has the ability to produce more than one result in a single
operation. So, according to the above example Employee and SalariedEmployee is
produced in a single operation as shown below,
46
Mohammed Azhar Ameena
Programming
Assignment 01
Event-driven programming
Figure 25
47
Mohammed Azhar Ameena
Programming
Assignment 01
Initially turtle must be imported. It consists of methods and functions
Then variables must be initiated

Event source - According to the above example, the event source is turtle, which is
also an object.

Event handler - This is used to handle the events. It recognizes the events by clicking
on the mouse. According to the above example the event handlers are, using this we
can move the turtle to the right, left, and to spin using the controls in the keyboard.
o
o
o
o

Event listener -This waits for an event to occur. It can be a single mouse click, or a
key being pressed on the keyboard. According to the above example the event listener
is shown as below,
48
Mohammed Azhar Ameena
Programming
Assignment 01
Example 2
Event source - Event source is an object. Events occur in event source. According to
above example the event source is the button.
Event - The single mouse click on the button is the event done by the object. It can be left
click, right click and etc.
49
Mohammed Azhar Ameena
Programming
Assignment 01
Activity 3
3.1 Algorithms for vehicle tariff calculation
Function 1 - Rent Calculation
Figure 26 pseudocode for rent calculation
50
Mohammed Azhar Ameena
Programming
Assignment 01
Function 2 - Day tour-hire calculation
Figure 27 pseudocode for day tour-hire calculation
51
Mohammed Azhar Ameena
Programming
Assignment 01
Function 3 - Long tour-hire calculation
Figure 28 pseudocode for long tour-hire calculation
52
Mohammed Azhar Ameena
Programming
Assignment 01
3.2
Console codes for the algorithms
Rent calculation
53
Mohammed Azhar Ameena
Programming
Assignment 01
54
Mohammed Azhar Ameena
Programming
Assignment 01
Figure 29 Output
Day tour-hire calculation
55
Mohammed Azhar Ameena
Programming
Assignment 01
56
Mohammed Azhar Ameena
Programming
Assignment 01
Figure 30 Output
57
Mohammed Azhar Ameena
Programming
Assignment 01
Long tour-hire calculation
58
Mohammed Azhar Ameena
Programming
Assignment 01
59
Mohammed Azhar Ameena
Programming
Assignment 01
Figure 31 Output
Database structure
Figure 32 Object explorer (SQL)
60
Mohammed Azhar Ameena
Programming
Assignment 01
Login
Figure 33 Login (visual studio)
Figure 34 Login (SQL)
Package
Figure 35 Package (visual studio)
Figure 36 Package (SQL)
61
Mohammed Azhar Ameena
Programming
Assignment 01
Vehicle
Figure 37 Vehicle (visual studio)
Figure 38 (SQL)
3.3
Integrated Development Environment (IDE)
IDE is a standalone software application which consists of a source code editor, compiler,
interpreter, and a debugger to develop a program. It helps the developers/ programmers to
develop a software efficiently by providing some basic tools that are necessary to test a
software. With the help of an IDE, the programmers can easily develop programs and can
be released into a production environment. Using an IDE, a graphical user interface can
be integrated with varieties of tools. Latest IDEs have intelligent code completion which
is easier to develop a software.
(Jaiswal, 2011)
62
Mohammed Azhar Ameena
Programming
Assignment 01
Features of an IDE

Text editor - A text editor is a tool which is used to operate the source code of a
program. It has the ability to drag and drop components, and has simple interfaces
which is distinctive to a specific language.

Debugger - This tool helps the users to detect and fix the errors in the source code. A
debugger pretend to test the performance of the program with the real-world scenario.
Thus, this tool is used by the programmers to detect errors before releasing the
software.

Compiler - A compiler is a computer program which translates programming
languages into machine language. A machine language is examined as to make sure
the validity of the program.

Code completion - This feature helps the developers to identify and insert codes to
the program, rather writing the code and arising up with errors. Thus, it reduces the
time consumption of the developer.

Program language support - Though IDEs support for several languages, it usually
defines to a single programming language. Thus, the programmer must ascertain the
language to be coded. For example, Python, Java and etc.

Integration and plugins - Integrations must be taken into consideration when
examining IDEs. Weak integration can lead to many issues and problems. Thus, the
programmers must ensure a progressive IDE that suits to the environment.
(Handorf, et al., 2012)
Features in my C# Visual studio IDE
The visual studio that I have been using is 2013 version, which provides adequate tools to
develop applications.
The features/components in my visual studio are mentioned below.

Properties window
The properties window shows the properties of objects and controls such as buttons,
textboxes, labels and etc. Using the properties window we can modify the names of the
textboxes, labels, buttons and etc. by giving valid names. Since it possess properties such
63
Mohammed Azhar Ameena
Programming
Assignment 01
as Back Color, Font, Fore Color, Form Border Style and many more, it helps to design
attractive interfaces without the coding.
Figure 39 Properties window

Solution explorer
Solution explorer manages solutions and projects. It allows to create many forms in one
project. Also it displays all the forms that are created. So that, it is easy to do the coding by
choosing the required form. It displays the form designer and the codes.
Figure 40 Solution explorer
64
Mohammed Azhar Ameena
Programming
Assignment 01

Windows form designer
Windows form designer is used to create Graphical User Interfaces (GUI). This window
has the ability to drag and drop, select, move, cut, copy, paste, delete, events and etc.
Figure 41 Windows form designer

Server explorer
Server explorer helps to connect to the database. It helps to display the tables and the
records that are stored in the database.
Figure 42 server explorer
65
Mohammed Azhar Ameena
Programming
Assignment 01

Tool box
A tool box is used to edit forms. It has many tools such as pointer, textboxes, labels,
buttons, and check box and so on. These tools are used to design the form in an attractive
way. Using these tools we can easily create and edit forms as per our requirement. To
pick a tool, just click on the tool and drag and drop it to the form.
Figure 43 Tool box

Debugger
Debugger is used to find errors within the code. It identifies errors while running the code.
When you click on the below mentioned icon, it will rectify the errors step by step. Thus,
this feature allows the programmers to rectify the errors and design the program as per the
user’s request.
Figure 44 Debug
66
Mohammed Azhar Ameena
Programming
Assignment 01
Some of the benefits that I came across when coding the program with the help of
the visual studio IDE

It helped me to develop the program faster and easier by preventing from errors and
providing shortcut methods.

It has debugging tools which helped me to test the program line by line by spotting
errors.

It helped me to identify parameters, when typing a function it shows some similar or
related functions /keywords. This made me easier to code the program efficiently and
accurately.

It allowed me to create graphical user interfaces (GUI) to the system.

It has the ability to format the code coding, indent the code automatically, allowed to
use comments which increases the readability of the program.

It allows to code the program in multi-language.

It supported me to develop the program faster.

It helps to create many forms in the same project

It has the ability to connect to the database. Thus, systems can be developed
efficiently with help of the database.
Struggles that I would have faced without IDE

Operating the source code would be difficult. As it has the ability to drag and drop
components, and has simple interfaces which is typical to a specific language.

The developed program will not be able to debug and test. Though the program is
developed it will have many errors. To detect the errors we need the debugging tool,
thus without an IDE the program will not be successful.

It would be difficult to create interfaces.

The codes cannot be designed as per my requirement.

It will consume more time and energy when coding the program, as everything should
be done manually.

Problems would have arouse when using form application as there is no any option to
use proper control names.
67
Mohammed Azhar Ameena
Programming
Assignment 01

Starting up forms will not be able to change easily, the forms that are used will not be
able to see, and will not be able to see the design view since there is no solution
explorer.
Overall conclusion
The programmers will face many difficulties without the help of IDE, since it helps to
develop the software by giving some basic features such as source code editor, compiler,
interpreter, and a debugger as mentioned above to develop a program. Thus, it is
mandatory to use IDE for a program to be effective and productive.
Activity 4
4.1 GUI s for Ayubo
Login
Figure 45 Login
68
Mohammed Azhar Ameena
Programming
Assignment 01
Home page
Figure 46 Home page
Vehicle
Search
Figure 47 search
69
Mohammed Azhar Ameena
Programming
Assignment 01
Figure 48 Vehicle table
Insert
Figure 49 Insert
Figure 50 Vehicle table
70
Mohammed Azhar Ameena
Programming
Assignment 01
Update
Figure 51 update
Figure 52 vehicle table
71
Mohammed Azhar Ameena
Programming
Assignment 01
Delete
Figure 53 Delete
Figure 54 vehicle table
72
Mohammed Azhar Ameena
Programming
Assignment 01
Package
Search
Figure 55 search
Figure 56 Package table
73
Mohammed Azhar Ameena
Programming
Assignment 01
Insert
Figure 57 Insert
Figure 58 Package table
74
Mohammed Azhar Ameena
Programming
Assignment 01
Update
Figure 59 Update
Figure 60 Package table
75
Mohammed Azhar Ameena
Programming
Assignment 01
Delete
Figure 61 Delete
Figure 62 Package
76
Mohammed Azhar Ameena
Programming
Assignment 01
Rent calculation with the driver
Figure 63 Rent calcualtion with the driver
77
Mohammed Azhar Ameena
Programming
Assignment 01
Rent calculation without the driver
Figure 64 Rent calculation without the driver
Figure 65 Total amount for rent calculation
78
Mohammed Azhar Ameena
Programming
Assignment 01
Day tour-hire calculation
Figure 66 Day tour-hire calculation
Figure 67 Total cost for Day tour-hire calculation
79
Mohammed Azhar Ameena
Programming
Assignment 01
Long tour-hire calculation
Figure 68 Long tour-hire calculation
Figure 69 Total cost for long tour-hire calculation
80
Mohammed Azhar Ameena
Programming
Assignment 01
4.2 Debugging
Debugging plays a major role while coding the program. It is the process of detecting and
rectifying the errors in the coding of the program. It is important to debug the program to
develop the system/software in an effective way. Debugging, tests the software whether it
works properly without any faults. Thus, it is a must to debug the program before handing
over it to the user.
Debugging features/tools available in the visual studio IDE

Breakpoints - Breakpoints helps to show the step by step execution of the program.
This allows to stop the code temporally at certain points.
Figure 70 Breakpoint

Edit and continue - This is used to edit the code while debugging. If it detects errors it
helps to pause and edit the code and then by clicking on the continue icon, it can
continue debugging the program.
Figure 71
Figure 72 continue

Controlled execution of the code - Executions can be controlled with the help of the
breakpoints
o
Step Into - This allows to call the function and track the code while the code is
running.
81
Mohammed Azhar Ameena
Programming
Assignment 01
o
Step Over - This is used to move to the next line while the code is running.
o
Step Out - This is used to bring out of the function, rather executing line by line
which directly takes to the next statement.

Execution point - This points out in which line the execution is taking place.
Figure 73 Execution point

Add watch - This helps to see the values while the programming is debugging.
Figure 74 Add watch

Condition breakpoint - This helps to stop the repetition by giving a condition to
detect the error.
Figure 75 condition breakpoint
82
Mohammed Azhar Ameena
Programming
Assignment 01
Debugging tools that I have used for my program to debug, are mentioned below.

Error list - This helped me to identify where program has gone wrong by spotting out
the errors. So the below mentioned error says a ‘;’ is expected.
Figure 76 Error list
Figure 77
So by inserting a semi-colon I was able to get over the error as shown below,
Figure 78

Try catch - Try catch is also another way to detect errors in the program. Try block is
used to test the code while executing, and a catch block has some coding as to show
when an error occurs in the try block. So try catch is used to detect errors while
running the program. Initially the coding in the try block will be tested, and if there
are any errors in the coding, it goes to the catch block. Thus by using this I was able
to recognize the errors and rectify them.
83
Mohammed Azhar Ameena
Programming
Assignment 01
Figure 79 Try catch

Break points - Breakpoints helps to run the program line by line by detecting errors.
So that, it is easy to recognize errors without any struggles, as it spots out the exact
place of the error. So by using this I was able to rectify the errors easily without any
struggles.
Figure 80 Breakpoints
Breakpoints helps to display the value when the mouse is pointed onto a particular
variable. It display the values of the variables while executing the program.
84
Mohammed Azhar Ameena
Programming
Assignment 01
Figure 81
Figure 82

Additional information - This also helps to find errors by giving some clues. So
according to the below example it says that the input string was not in a correct
format, thus, by inputting the string in a correct format we can rectify the error easily.
And it saves time as well.
Figure 83 Additional information

Step into execution - It helps to execute the code line by line. As mentioned below, the
breakpoint started from exKmChrge = exKm * exKmRate and then stepped into the
next line ExHrChrge = ExHrs * ExHrRate. So by using this tool, it is easy to detect
errors in the code.
Figure 84 step into execution
85
Mohammed Azhar Ameena
Programming
Assignment 01

Step Over execution - This can be used to move to the next line.
Figure 85 Step Over execution
Overall conclusion
Thus, in my point of view the debugging tools play a major role while coding a program,
as it has many features to detect errors and issues. And it is very easy and efficient to
develop a program in a better way. It saves time and energy. So, by using these
debugging tools I secured my program against vulnerabilities. And it helped me out to
develop the program in an effective way.
4.3
Coding standards
Modules detailed in the document are coded according to the module requirement. The
coding phase is used to code from the document that is designed in the design phase. For
a software to develop in a better way, programmers use some standard style of coding
which is called as coding standards. These coding standards are made according to the
organization’s requirement. Programmers must maintain the coding standards, otherwise
the code will be rejected during code review.
Benefits of having coding standards

Coding standards shows an identical appearance to the code.

Reduces complexity

Improves readability and maintainability of the code.

It helps to reuse the code by finding errors.

Increases the productivity of the programmers.
(Jain, n.d.)
86
Mohammed Azhar Ameena
Programming
Assignment 01
Coding standards that I have used in my program are mentioned below.

Use of proper variable names
Meaningful and comprehensible variable names helps any person to read and understand
the program.
Figure 86 variable names
Figure 87
Figure 88

Indentation
Using of proper indention helps to maintain the program. It automatically gets indented
with the brackets. Brackets are used to indent the coding. So according to the below
example it is clear that the codings are inside the if.
Figure 89 Indentation

Use of proper control names
These control names may help to know what it states in the code. Using these codes, the
programmers can easily develop the program without any struggles.
Figure 90 control names
87
Mohammed Azhar Ameena
Programming
Assignment 01
Figure 91
Figure 92
Figure 93
Figure 94

Use of Comments
Comments are used to review the codes as to understand what the coding states.
Figure 95 comments
Figure 96
Figure 97
Importance of coding standards for an individual
As an individual, coding standards helps to increase the efficiency and the productivity of
the program. Proper coding standards consumes less time to develop a program. It helps
to identify errors while running the code, it increases readability and maintainability of
the program which in turn reduces the cost to develop the software. Without proper
coding standards, the developers will not be able to develop the system/software in an
effective manner as per their requirement.
Importance of coding standards for the team
To develop a system, there are group of people such as testers, software engineers,
incident managers, database developers, programmers, designers, administrators and etc.
So these people work on the same project to develop a system. So, when there is no proper
88
Mohammed Azhar Ameena
Programming
Assignment 01
coding standard, each and every one might use their own coding which can come up with
many issues and errors, which will even make the company down. Thus, it is important to
maintain the coding standards to as to make others to understand the coding of the
program. It is very important for the programmers to maintain the coding standards
otherwise the code will be rejected during the code evaluation. Not only the programmers
must know about the coding, others who work on the same project too should have an idea
about this, thus it is better to maintain coding standards for a system to be effective and
productive.
Advantages of using coding standards as an individual and as a team

Can easily debug the code.

Can overcome from security issues.

It can be easily maintained.

Reduces the cost to develop a system.

Helps to assess the code easily.

Helps to increase the productiveness and effectives of the program

Use of proper control names make others to understand the program. For example,
This states the textbox has this particular name that is the months, rather using
textbox1, 2, and 3 and so on. Thus it is easy to use without any struggles whenever
needed. When using the default text box names, it can confuse the developers. So it is
a must to proper control names.

Use of proper variable names helps to understand the coding. For example,
It is very clear that these variables helps to make someone apprehend who goes
through the coding. Since these variable are meaningful one can easily understand the
program. And use of meaningless variables can reduce the effectiveness of the system
which can come up with many errors and issues.
89
Mohammed Azhar Ameena
Programming
Assignment 01
Disadvantages of using coding standard as an individual and as a team

Rules and regulations must be maintained when performing code reviews.

If anything goes wrong in the code, the entire system collapse.

Sometimes the coding standards can be meaningless when there is more anomaly.

Standards should be assessed often.
Overall conclusion
Though the coding standards possess disadvantages, it plays a major role when developing
a system. It seems to be the backbone of the system. It can be easily used if it is maintained
well. It has many advantages than the disadvantages. Thus, coding standards must be used
for a system to be productive and effective.
Conclusion for the assignment
I hereby accomplish my assignment with the help of the lecturer’s support and guidance. I
tried my best to include all the necessary points that are required to the related questions
by doing a lot of research via internet. By the end of the assignment I gained more
knowledge. And it was a wonderful learning experience as it helped out me to learn more
interesting facts.
My Strengths and Weaknesses
Strengths

Good at time management and was able to accomplish the assignment on time

With the lecturer’s guidance, was able to complete the assignment without any
uncertainty.

A good researcher.
Weaknesses

Less confident

Quite tensed before commencing

Impatience
90
Mohammed Azhar Ameena
Programming
Assignment 01
Gantt chart
16-Oct
21-Oct
26-Oct
31-Oct
5-Nov
10-Nov
15-Nov
20-Nov
25-Nov
30-Nov
Task 1
Task 2
Task 3
Task 4
Start Date
Days
Figure 98 Gantt chart for the assignment
References
Chang, S.-K., 2003. The Running Time of an Algorithm. In: S. Chang, ed. Data Structures And
Algorithms. 5 Toh Tuck Link: world Scientific Publishing Co.Pte.Ltd, pp. 17-18.
Cormen, T. H., Leiserson, C. E., Rivest, R. L. & Stein, C., 1990. Introduction to Algorithms. 2nd
ed. United States of America: The MIT Press.
Data,
R.,
2009.
w3schools.
[Online]
Available
at:
https://www.w3schools.in/data-structures-tutorial/big-o-notation-andalgorithm-analysis/
[Accessed 26 October 2020].
Godse, A. P. & Godse, D. A., 2007-2008. Computer software and programming. 1st ed. Pune:
Technical Publications Pune.
Gondaliya, V., 2019. Programming With Python. s.l.:Vaibhav Gondaliya.
Group, I., 2005. Data Structures Using C. New Delhi: Tata McGraw-Hill Education.
Handorf, T., Abel , G.
Available
[Accessed 17 November 2020].
&
Wheeler,
M.,
at:
2012.
G2 Crowd. [Online]
https://learn.g2.com/ide
Jain,
S.,
n.d.
GeeksforGeeks.
[Online]
Available
at:
https://www.geeksforgeeks.org/an-introduction-to-flowcharts/
[Accessed 9 October 2020].
91
Mohammed Azhar Ameena
Programming
Assignment 01
Jain,
S.,
n.d.
GeeksforGeeks.
[Online]
Available
at:
https://www.geeksforgeeks.org/an-introduction-to-flowcharts/
[Accessed 13 November 2020].
Jain,
S.,
n.d.
GeeksforGeeks.
[Online]
Available
at:
https://www.geeksforgeeks.org/how-to-write-a-pseudo-code/
[Accessed 13 November 2020].
Jain,
S.,
Available
at:
[Accessed 1 November 2020].
n.d.
GeeksforGeeks.
[Online]
https://www.geeksforgeeks.org/encapsulation-in-java/
Jain,
S.,
Available
at:
[Accessed 2 November 2020].
n.d.
GeeksforGeeks.
[Online]
https://www.geeksforgeeks.org/polymorphism-in-java/
Jain,
S.,
n.d.
GeeksforGeeks.
[Online]
Available at: https://www.geeksforgeeks.org/introduction-of-programming-paradigms/
[Accessed 18 October 2020].
Jain,
S.,
n.d.
GeeksforGeeks.
[Online]
Available
at:
https://www.geeksforgeeks.org/coding-standards-and-guidelines/
[Accessed 18 November 2020].
Jaiswal,
S.,
Available
at:
[Accessed 9 October 2020].
2011.
Javatpoint.
[Online]
https://www.javatpoint.com/data-structure-algorithm
Jaiswal,
S.,
Available
at:
[Accessed 6 October 2020].
2011.
Javatpoint.
[Online]
https://www.javatpoint.com/linear-search-in-java
Jaiswal,
S.,
Available
at:
[Accessed 13 November 2020].
2011.
Javatpoint.
[Online]
https://www.javatpoint.com/binary-search
Jaiswal,
S.,
Available
at:
[Accessed 17 November 2020].
2011.
Javatpoint.
[Online]
https://www.javatpoint.com/ide-full-form
Littlewood,
B.
J.,
Available
[Accessed 11 November 2020].
2003.
UK
Essays.
[Online]
https://www.ukessays.com
J.,
2005.
Chegg.
[Online]
https://www.chegg.com
at:
Phumbhra,
A.,
Rashid,
O.
&
Available
at:
[Accessed 11 November 2020].
Carlson,
Puntambekar, A., 2010. Design & Analysis of Algorithms. 1st ed. Pune: Technical Publications
Pune.
Sal,
2005.
Khan
Academy.
[Online]
Available
at:
https://www.khanacademy.org/computing/computerscience/algorithms/asymptotic-notation/a/big-o-notation
[Accessed 9 November 2020].
92
Mohammed Azhar Ameena
Programming
Assignment 01
93
Mohammed Azhar Ameena
Programming
Assignment 01
Download