0% found this document useful (0 votes)
16 views137 pages

Sharini Himaya - Unit 01 Programming Assignment - Reworded 2021

The document outlines the internal verification process for assessment decisions related to the Higher National Diploma in Computing, specifically focusing on the Programming unit. It includes details on assessment criteria, feedback mechanisms, and guidelines for assignment submissions, emphasizing the importance of adhering to academic integrity and proper formatting. Additionally, it provides a comprehensive assignment brief for students, detailing the requirements for a GUI-based system project, including implementation, presentation, and evaluation criteria.

Uploaded by

aquinasgamingyt
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views137 pages

Sharini Himaya - Unit 01 Programming Assignment - Reworded 2021

The document outlines the internal verification process for assessment decisions related to the Higher National Diploma in Computing, specifically focusing on the Programming unit. It includes details on assessment criteria, feedback mechanisms, and guidelines for assignment submissions, emphasizing the importance of adhering to academic integrity and proper formatting. Additionally, it provides a comprehensive assignment brief for students, detailing the requirements for a GUI-based system project, including implementation, presentation, and evaluation criteria.

Uploaded by

aquinasgamingyt
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 137

Higher Nationals

Internal verification of assessment decisions – BTEC (RQF)

INTERNAL VERIFICATION – ASSESSMENT DECISIONS

Programme title Higher National Diploma in Computing

Ms. Vishmi Embuldeniya


Assessor Internal Verifier
Unit 01: Programming
Unit(s)
Design &Implement a GUI based system using a suitable Integrated
Assignment title Development Environment

Kankanamge Don Sharini Himaya Kumarasiri


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


accurately? Y/N

Is the feedback to the student:


Give details:
• Constructive?
• Linked to relevant assessment criteria?
Y/N
• Identifying opportunities for

Sharini Himaya | Programming – Assignment 01


improved performance? Y/N
• Agreeing actions? Y/N
Y/N

Does the assessment decision need


amending? Y/N

Assessor signature Date

Internal Verifier signature Date

Programme Leader signature (if required)


Date

Sharini Himaya | Programming – Assignment 01


Confirm action completed

Remedial action taken

Give details:

Assessor signature Date

Internal Verifier
signature Date

Programme Leader
signature (if required) Date

Sharini Himaya | Programming – Assignment 01


Higher Nationals - Summative Assignment Feedback Form
Student Name/ID Kankanamge Don Sharini Himaya Kumarasiri / E159204

Unit Title Programming

Assignment Number 01 Assessor Ms. Vishmi Embuldeniya


28/12/2022 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 Descripts P1 M1 D1

LO2. Explain the characteristics of procedural, object-orientated and event-driven programming, conduct an analysis of a su
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 a coding standard.
Pass, Merit & Distinction Descripts P4 P5 M4 D4

Sharini Himaya | Programming – Assignment 01


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.

Assignment Feedback
Formative Feedback: Assessor to Student

Action Plan

Summative feedback

Sharini Himaya | Programming – Assignment 01


Feedback: Student to Assessor

Assessor Date
signature

Student Date
signature

Sharini Himaya | Programming – Assignment 01


Pearson Higher Nationals in

Computing
Unit 01: Programming
Assignment 01

Date Submitted: 28/12/2022

Sharini Himaya

COL00138107 / E159204

Sharini Himaya | 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.
Sharini Himaya | Programming – Assignment 01
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

Sharini Himaya | 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 Edexcel UK.
6. I understand that my assignment will not be considered as submitted if this document is
not attached to the attached.

[email protected]
Student’s Signature: Date: 28/12//2022
(Provide E-mail ID) (Provide Submission Date)

Sharini Himaya | Programming – Assignment 01


Higher National Diploma in Computing
Assignment Brief
Student Name /ID Number Kankanamge Don Sharini Himaya Kumarasiri / E159204

Unit Number and Title Unit 01: Programming

Academic Year 2021/22

Unit Tutor Ms. Vishmi Embuldeniya

Assignment Title Design &Implement a GUI based system using a suitable


Integrated Development Environment

Issue Date 25/08/2022

Submission Date 28/12/2022

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

Sharini Himaya | Programming – Assignment 01


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:

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

Sharini Himaya | Programming – Assignment 01


Assignment Brief and Guidance:

Activity 1

A. The Fibonacci numbers are the numbers in the following integer sequence.
0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, ……..

In mathematical terms, the sequence Fn of Fibonacci numbers is defined by the recurrence


relation.

Fn = F n-1 + F n-2

B. Factorial of a non-negative integer, is multiplication of all integers smaller than or equal


to n. For example, factorial of 6 is 6*5*4*3*2*1 which is 720.

n! = n * (n - 1) * …….. 1

Define what an algorithm is and outline the characteristics of a good algorithm. Write the
algorithms to display the Fibonacci series and the factorial value for a given number using
Pseudo code. Determine the steps involved in the process of writing and executing a
program.

Take a sample number and dry run the above two algorithms. Show the outputs at the end
of each iteration and the final output. Examine what Big-O notation is and explain its role in
evaluating efficiencies of algorithms. Write the Python program code for the above two

Sharini Himaya | Programming – Assignment 01


algorithms and critically evaluate their efficiencies using Big-O notation.

Activity 2

2.1 Explain what is meant by a Programming Paradigm and the main characteristics
of Procedural, Object oriented and Event-driven paradigms and the relationships
among them. Write small snippets of code as example for the above three
programming paradigms using a suitable programming language(s). you also need to
critically evaluate the code samples that you have given above in relation to their
structure and the unique characteristics.

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.

Sharini Himaya | Programming – Assignment 01


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 typeif 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

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,

Sharini Himaya | Programming – Assignment 01


waiting_charge and extra_km_charge as output parameters.

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.

Write suable algorithms for vehicle tariff calculation for rents and hires. Ideally 3
functions should be developed for this purpose as above. Use the visual studio IDE
(using C#.net) to Implement the above algorithms 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.

Analyze the features of an Integrated Development Environment (IDE) and explain how
those features help in application development. Evaluate the use of the Visual
StudioIDE 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 forAyubo 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.

Sharini Himaya | Programming – Assignment 01


4.2 Explain debugging process and 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 Outline 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.

Sharini Himaya | 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.

P1Provide a definition of what an algorithm is and outline


the process in building an application.

M1Determine the steps taken from writing code to


execution.

18
D1 Evaluate the implementation of an algorithm in a suitable
language. Evaluate the relationship between the written
algorithm and the code variant

Sharini Himaya | Programming – Assignment 01


LO2 Explain the characteristics of procedural,
objectorientated and event-driven programming,
conduct an analysis of a suitable Integrated
Development Environment (IDE)
P2Give explanations of what procedural, objectorientated,
and eventdriven paradigms are; their characteristics and the
relationship between them.
M2 Compare and contrast the procedural, object
orientated and event driven paradigms used in given
source code of an application
D2Critically evaluate the source code of an application which
implements the programming paradigms, in terms of the
19

code structure and characteristics.

Sharini Himaya | Programming – Assignment 01


LO3Implement basic algorithms in code using an IDE.

P3Write a program that implements an algorithm using an


IDE.

M3Use the IDE to manage the development process of the


program.

D3Evaluate the use of an IDE for development of


applications contrasted with not using an IDE.
20

Sharini Himaya | Programming – Assignment 01


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

P4Explain the debugging process and explain the debugging


facilities available in the IDE.

P5Outline the coding standard you have used in your code.

M4Evaluate 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.
21

Sharini Himaya | Programming – Assignment 01


Table of Contents
ACKNOWLEDGEMENT .......................................................................................................................... 27
INTRODUCTION ................................................................................................................................... 28
ACTIVITY 01 ................................................................................................................................... 29
1.1 WHAT IS AN ALGORITHM? ........................................................................................ 29
1.1.2 Types of Algorithms ............................................................................................. 30
1.1.3 Characteristics of a good Algorithm ..................................................................... 31
1.1.4 Pseudocodes .......................................................................................................... 33
Algorithm for the Fibonacci Series ........................................................................... 34
Pseudocode for the Fibonacci Series ......................................................................... 35
Algorithm for the Factorial value............................................................................... 37
Pseudocode for the Factorial value ............................................................................ 38
Dry Running the Fibonacci sequence and the Factorial............................................. 38
Dry Run for the Fibonacci sequence .......................................................................... 39
Dry Run for the Factorial ........................................................................................... 41
Steps involved in the process of writing and executing a program. .......................... 41
1.2 Big-O Notation ......................................................................................................... 47
1.2.1 Big-O notation is and explain its role in evaluating efficiencies of algorithms 48
1.2.2 Determining the efficiency of the program using Big-O Notation ................... 50
1.3 Python program code for the above two algorithms ................................................ 51
1.3.1 Python Code for the Fibonacci sequence .......................................................... 51
1.3.2 Python Code for the Factorial ........................................................................... 53
2.1 PROGRAMMING PARADIGMS ..................................................................................... 55
2.1.1 Procedural Programming .................................................................................. 56
2.1.2 Object Oriented Programming .......................................................................... 59
2.1.3 Event Driven Programming .............................................................................. 63
2.2 DIFFERENCE BETWEEN PROGRAMMING PARADIGMS ............................................. 73
2.2.1 Difference between Procedural and Object Oriented paradigms ...................... 73
2.2.2 Difference between Procedural and Event Driven paradigms .......................... 73
2.2.3 Difference between Event driven and Object Oriented paradigms ................... 74
2.3 INTEGRATED DEVELOPMENT ENVIRONMENT (IDE) .............................................. 75
2.3.1 Types of Integrated Development Environments............................................. 76
2.3.1 Types of Integrated Development Environments ............................................. 78
Sharini Himaya | Programming – Assignment 01
3.1 Algorithm for Rent Calculation ........................................................................... 80
3.2 Algorithm for Day-Tour Calculation ................................................................... 82
3.3 Algorithm for Long-Tour Calculation ................................................................. 83
3.4 Logical Database Diagram ................................................................................... 86
3.5 Database Structure and interfaces of the system .................................................. 88
4.1 Graphical User Interface and Functions of the Implemented System ................... 101
Interface for Menu Page ............................................................................................... 103
Interface for Vehicle Page............................................................................................ 105
Add Button ............................................................................................................... 106
Update Button .......................................................................................................... 108
Delete Button ........................................................................................................... 109
View Button ............................................................................................................. 110
Interface for Packages Page ......................................................................................... 111
Interface for Rent Calculation ...................................................................................... 112
Interface for Day-Tour Calculation.............................................................................. 115
Interface for Long-Tour Calculation ............................................................................ 118
4.2 What is debugging? ................................................................................................................ 122
4.2.1 Benefits of debugging ......................................................................................... 122
4.2.2 Debugging process .......................................................................................... 123
4.3.3 Debugging features in Visual Studio IDE........................................................... 123
4.3.4 Usage of debugging to develop more secure and robust applications ................ 126
Debugging and security ........................................................................................... 126
4.5 Coding standards .................................................................................................... 127
CONCLUSION ................................................................................................................................ 133
REFERENCES ..................................................................................................................................... 135

Sharini Himaya | Programming – Assignment 01


Table of Figures
Figure 1 - Fibonacci sequence ........................................................................................... 34
Figure 2 - Programming Steps ........................................................................................... 42
Figure 3 - Flowchart to print the sum of two numbers ...................................................... 44
Figure 4 - Python code to find the sum of two numbers .................................................... 45
Figure 5 - Big-O Complexity Chart ................................................................................... 50
Figure 6 - Python code for the Fibonacci sequence ........................................................... 52
Figure 7 - Output of the Python Code for Fibonacci sequence .......................................... 53
Figure 8 - Python code and the Output to find the Factorial of a number ......................... 54
Figure 9-Procedural Programming with Output ................................................................ 58
Figure 10-Object Oriented Programming .......................................................................... 62
Figure 11-Object Oriented Programming .......................................................................... 62
Figure 12-Object Oriented Programming Output .............................................................. 62
Figure 13-Addition ............................................................................................................. 65
Figure 14-Clear .................................................................................................................. 66
Figure 15-Substraction ....................................................................................................... 67
Figure 16-Multiplication .................................................................................................... 68
Figure 17-Division ............................................................................................................. 69
Figure 18-Code snippet for Event driven Programming Calculator .................................. 70
Figure 19-Scode snippet for Event driven Programming Calculator ................................. 70
Figure 20-Scode snippet for Event driven Programming Calculator ................................. 71
Figure 21-Logical Database Diagram for the Car Rental System ..................................... 86
Figure 22-Creating Database ............................................................................................. 88
Figure 23-Created Database ............................................................................................... 89
Figure 24-Vehicle Database ............................................................................................... 89
Figure 25-Packages Database ............................................................................................ 90
Figure 26-Rent Database .................................................................................................... 91
Figure 27-Day- Tours Database ......................................................................................... 91
Figure 28-Long-Tours Database ........................................................................................ 92
Figure 29-Vehicle Interface ............................................................................................... 93
Figure 30-Purchase Interface ............................................................................................. 94
Figure 31-Rent Interface .................................................................................................... 95
Figure 32-Day-Tours Interface .......................................................................................... 96
Figure 33-Long-Tours Interface ......................................................................................... 97
Sharini Himaya | Programming – Assignment 01
Figure 34-Interface for Vehicle Page................................................................................ 105
Figure 35-Code for View Button ..................................................................................... 110
Figure 36-View Button .................................................................................................... 111
Figure 37-Packages Interface ........................................................................................... 112
Figure 38-Code for Rent Calculation ............................................................................... 113
Figure 39-Code for Rent Calculation ............................................................................... 114
Figure 40-Interface for Rent Page Calculation ................................................................ 115
Figure 41-Day tour calculation code ................................................................................ 116
Figure 42-Day tour calculation code ................................................................................ 116
Figure 43-Day tour calculation code ................................................................................ 117
Figure 44-Day tour calculation code ................................................................................ 117
Figure 45-Day Tour Calculation Interface ....................................................................... 118
Figure 46-Code for Long-Tour Calculation ..................................................................... 119
Figure 47-Code for Long-Tour Calculation ..................................................................... 119
Figure 48-Code for Long-Tour Calculation ..................................................................... 120
Figure 49-Long Tour Interface ........................................................................................ 121

Sharini Himaya | Programming – Assignment 01


List of Tables
Table 1 - Dry run for Fibonacci Series .............................................................................. 39
Table 2 - Dry run for Factorial ........................................................................................... 41
Table 1-Difference between procedural and OOP Paradigms ........................................... 73
Table 2- Difference between event driven and procedural Paradigm ................................ 74
Table 3- Difference between event driven and OOP ......................................................... 74
Table 1-Text Editor and IDE.............................................................................................. 100
Table 1-Menu Page .......................................................................................................... 103
Table 2-Menu Page Code ................................................................................................. 104
Table 3-Code for the Add button ..................................................................................... 106
Table 4-Code for Update Button ...................................................................................... 108
Table 5-Update Button ..................................................................................................... 109
Table 6-Code for Delete Button ....................................................................................... 109
Table 7-Delete Button ...................................................................................................... 110

Sharini Himaya | Programming – Assignment 01


ACKNOWLEDGEMENT
I want to sincerely thank Ms. Vishmi Embuldeniya, my lecturer, for her assistance and
direction in helping me finish my first ever assignment. I could not have finished my
task without her. Her lecture notes and explanations proved to be quite helpful as I
worked on my assignment. I am glad to have been one of her students because she was
without a doubt an excellent lecturer.

Additionally, I would like to thank my classmates for their cooperation and assistance in
making this assignment possible and I want to express my gratitude to my parents for
their immense love and blessings.
Finally yet importantly, I want to thank ESOFT Metro Campus for assisting me during
my assignment.

I will never forget how you inspired me, and I sincerely hope that you will continue to
love and support me in all of my future pursuits.

Sincerely,
Sharini Himaya.

Sharini Himaya | Programming – Assignment 01


INTRODUCTION
We also cover a subject in our semester 01 called "Programming." Programming
requires describing algorithms-derived processes and procedures. By defining the data
and procedure required to express the problem, algorithms assist in describing the
solution to a problem or task. Typically, programming languages result in the
representation of both the data and the process.
I was able to design and implement algorithms in a preferred language within a suitable
development environment (IDE) after completing a programming unit. This allowed me
to optimize skills like communication literacy, critical thinking, analysis, reasoning, and
interpretation, all of which are essential for finding employment and advancing
academically.

Sharini Himaya | Programming – Assignment 01


ACTIVITY 01

WHAT IS AN ALGORITHM?
An algorithm is termed as a step by step procedure that can be used to perform a specific
task or action. An algorithm developed for a particular task can be defined as a finite set
of instructions, each of which has a defined meaning and can be finished in a finite
amount of time with a finite amount of effort, according to (Bullinaria, 2019). An
algorithm must therefore be precise enough for people to comprehend it. Moreover, it is
suggested by (Gillis, 2022) that algorithms can be divided into a number of groups,
including natural languages, programming languages, pseudocode, flowcharts, and
control tables. Expressions in natural languages are uncommon because they are more
complicated. A computer's algorithms are typically expressed in programming
languages. An algorithm is frequently mistaken for machine code. This assertion is
untrue. An algorithm can be written in plain English or any other language that the
programmer is familiar with. It clearly displays the beginning and the end by having a
"Start" and an "End" statement. In order to find a solution to a problem or to prepare the
way for doing so, algorithms are designed. The two types of algorithms that
programmers and beginners to programming use the most are pseudocodes and
flowcharts.

(Lonny Meinecke, What is an Algorithm in Programming? - Definition, Examples


& Analysis)

Sharini Himaya | Programming – Assignment 01


Types of Algorithms
1. Brute Force Algorithm: A Brute Force Algorithm is the simplest solution to a
problem, or the first solution that springs to mind when we encounter the
problem. Technically speaking, it is similar to repeating through all of the
alternatives solutions available to resolve that issue.
2. Recursive Algorithm: Recursion is the base of this kind of algorithm. It is the
process of solving a problem by breaking it down into smaller problems of the
same type and constantly calling itself until the issue is solved. Factorial of a
Number, Fibonacci Series etc. are a few examples of common problems that can
be solved using recursive algorithms.
3. Divide and Conquer Algorithm: Here, it is intended to address the issue in two
parts, with the first part breaking the issue down into related issues of the same
kind. The smaller problem must be solved on your own in the second section
before adding the results to reach at the complete solution.
4. Dynamic Programming Algorithm: So because goal of this algorithm is to store
the previous calculation's result rather than recalculating it, it is also referred as
the memorization approach. It split the difficult problem into smaller,
overlapping sub problems using dynamic programming, then store the solution
for later use.
5. Greedy Algorithm: Here, the method is used to progressively determine the
solution. This can assist in preventing the previously assumed possibilities from
entering the solution.
6. Backtracking Algorithm: This is an evolutionary algorithm technique for solving
problems recursively by trying to build a solution incrementally, one piece at a

Sharini Himaya | Programming – Assignment 01


time, and avoiding those solutions that fail to satisfy the constraints of the
problem at any point in time.
7. Randomized Algorithm: During the computing process, random numbers are
selected at least once for decision-making in this method.
8. Sorting Algorithm: In this case data is sorted using the sorting algorithm,
sometimes in ascending or descending order. It is also employed to efficiently
and effectively organize the data.
9. Searching Algorithm: The searching algorithm is the method used to find a
particular key in a set of sorted or unsorted data.
10. Hashing Algorithm: Although hashing techniques provide an index with a key
ID, they function similarly to searching algorithms. The Hashing Algorithm can
be used in password verification.

(Muskan, Most important type of algorithms 2022)

Characteristics of a good Algorithm


A good algorithm, according to (Sondhi, 2021) must be clear, which means that since an
algorithm is like a design for an application, it must be easy to understand and have
clearly defined input and output requirements. An algorithm's stages should be able to
be counted, and it should come to an end after a certain number of steps. An algorithm's
effectiveness must be preserved in order to produce efficient results. This can be
achieved through the Time parameter, which measures how long it takes for an
algorithm to process, and the Space parameter, which describes how much storage space
the algorithm needs in relation to the input criteria. Finally, algorithms must be language

Sharini Himaya | Programming – Assignment 01


independent, meaning they must function in all programming languages. These are some
characteristics of a good algorithm:
1. Input Specified: An algorithm should contain well-defined inputs. Input precision
implies that the programmer is aware of the type of data, how much of it should
be, and in what form it should be.
2. Output Specified: The results of the computation are your intended result. An
algorithm should produce at least one output that is clearly defined and matches
the desired output. Output precision also requires that you know what kind of
data, how much and what form the output should be returned.
3. Definiteness: An algorithm has to be clearly written and unambiguous. It also has
to specify each and every step clearly till the point of output. Definiteness means
specifying the sequence of operations for turning into output clearly.
4. Effectiveness: An algorithm must contain all the steps that are needed to get the
output. It has to be feasible and filled with adequate resources. It should not
contain any unwanted steps that could make the algorithm inappropriate.
5. Finiteness: All algorithms has to be terminated in some point with a meaningful
Output. It should happen in a finite number of steps. An algorithm should not be
Infinite and always end after the necessary steps are processed. There is no point
in presenting an algorithm which is infinite as it will be useless.
6. Independent: An algorithm must contain step by step directions to solve a task. It
should be independent of any programming code. It could be created such that it
is possible to run on any programming language available.
(Shlok Bhatt, Characteristics of an Algorithm, 2019)

Sharini Himaya | Programming – Assignment 01


Pseudocodes

Pseudocode is an informal type of programming description that doesn't require


for any knowledge of theoretical aspects or regular programming language syntax. It is
used to develop a program's preliminary draft or blueprint. Pseudocode condenses a
program's flow but omits supporting information. To make sure that programmers
comprehend the specifications of a software project and align their code correctly,
they create pseudocode.

Features of Pseudocodes are:


 The majority of programmers are familiar with pseudocode even if they are not
much familiar with the programming languages.
 It allows the programmer to focus only on the algorithmic aspect of the code
development.
 It can't be turned into an executable program through compilation.

(The Economic Times, What is 'Pseudocode')

C. The Fibonacci numbers are the numbers in the following integer sequence.
0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, ……..

In mathematical terms, the sequence Fn of Fibonacci numbers is defined by the


recurrence relation.

Fn = F n-1 + F n-2

Sharini Himaya | Programming – Assignment 01


Figure 1 - Fibonacci sequence

Algorithm for the Fibonacci Series

START
Step 1 → Take integer variable A, B, C
Step 2 → Set A = 0, B = 0
Step 3 → DISPLAY A, B
Step 4 → C = A + B
Step 5 → DISPLAY C
Step 6 → Set A = B, B = C
Step 7 → REPEAT from 4 - 6, for n times
STOP

Sharini Himaya | Programming – Assignment 01


Pseudocode for the Fibonacci Series

procedure fibonacci: fib_num

IF fib_num less than 1


DISPLAY 0

IF fib_num equals to 1
DISPLAY 1

IF fib_num equals to 2
DISPLAY 1, 1

IF fib_num greater than 2


Pre = 1,
Post = 1,

DISPLAY Pre, Post


FOR 0 to fib_num-2
Fib = Pre + Post
DISPLAY Fib
Pre = Post
Post = Fib
END FOR

Sharini Himaya | Programming – Assignment 01


END IF

End procedure

OR

START
First, we should tell how many terms we want to display
nterm = Enter the value
num1 = 0
num2 = 1
count = 0

IF nterm <= 0:
DISPLAY "Enter a valid number"

ELSE IF nterm == 1:
DISPLAY "The Fibonacci sequence of the numbers up to", nterms, ": "
DISPLAY num1

ELSE
DISPLAY "The Fibonacci sequence of the numbers is:"
while count < nterm:
DISPLAY num1
numTH = num1 + num2

num1 = num2

Sharini Himaya | Programming – Assignment 01


num2 = numTH
count += 1
END

 Fibonacci Series produces a new number by adding two earlier values. The
Fibonacci sequence begins with the two numbers F0 and F1.
D. Factorial of a non-negative integer, is multiplication of all integers smaller
than or equal to n. For example, factorial of 6 is 6*5*4*3*2*1 which is 720.

n! = n * (n - 1) * …….. 1

Algorithm for the Factorial value


Step 1: Start
Step 2: Declare Variable n, fact, i
Step 3: Read num from User
Step 4: Initialize Variable fact=1 and i=1
Step 5: Repeat Until i<=num
5.1 fact=fact*i
5.2 i=i+1
Step 6: Print fact
Step 7: Stop

Sharini Himaya | Programming – Assignment 01


Pseudocode for the Factorial value
START
num = 0
factorial = 1
“Enter a number”
IF num < 0:
DISPLAY “Factorial does not exist for negative numbers"

ELSE IF num == 0
DISPLAY “The factorial of 0 is 1”

ELSE
for i in range (1, num + 1)
factorial = factorial*i
DISPLAY "The factorial of", num,"is", factorial
END

 Factorial of a Number is represented by the symbol n and is the product of all


successive integer integers up to n! The value of 5!, for instance, is 120.

Dry Running the Fibonacci sequence and the Factorial

A dry run is the manual execution of a programmer's code to check the value of
variables. Therefore, a printout of the code would typically be used during a dry run. To
verify that a variable was accessed and updated in accordance with expectations, the

Sharini Himaya | Programming – Assignment 01


programmer would manually follow its value while seated at a desk with a pen and
paper. By following this method the programmer will be able to find out the mistakes in
the code including the section of where the mistake has occurred.

Following are the characteristics of a dry run:

 It is carried out during design, implementation, testing or maintenance stages.

 It is used to identify logical errors therefore, they will not assist in figuring out
execution errors.

(BBC, Dry run - testing - higher computing science revision - BBC bitesize)

Dry Run for the Fibonacci sequence

Table 1 - Dry run for Fibonacci Series

Line number Input(nterm) count output


1 6 0
2 0 0
3 1 1
4 2 1
5 3 2
6 4 3
7 5 5
8 6 8

Sharini Himaya | Programming – Assignment 01


9 7 13
10 8 21
11 9 34
12 10 55
13 11 89
14 12 144

Sharini Himaya | Programming – Assignment 01


Dry Run for the Factorial

Table 2 - Dry run for Factorial

Line number num i factorial output

1 6 1

2 1 1 1

3 2 1 2

4 3 2 6

5 4 6 24

6 5 24 120

7 6 120 720

Steps involved in the process of writing and executing a program.


It's not that simple to create a software or applications as we might expect. Several
procedures and actions need to be carried out during the development. It is impossible to
create anything this delicate and significant without a plan or a procedure. A set of
specific strategies has to participate in the application-creation process as follows:

Sharini Himaya | Programming – Assignment 01


Figure 2 - Programming Steps

1. Analyzing the problem: Obtaining the following information is required for the
initial step of programming. The problem needs to be thoroughly defined in this
step. Input/output, processing requirements, memory requirements, error
handling, and integrating with other programs are all variables that need to be
taken into consideration at this stage. These items are crucial for the programmer
since they give him the foundation for planning his program and for managing
any potential problems in the future. The process ends when all the
programmer’s questions have been resolved and the requirements of the program
are understood.
Ex: Sum of two numbers (N1+N2)

2. Algorithm design: Each of the procedures that must be followed at various levels
are stated at this stage. These are written in simple English. It might be described
as a strategy. Algorithms, which are similar to equations, are used in programs to
instruct computers on what to do. The goal of the programmer is to design
simple and understandable algorithms. Modularization is a logical hierarchical
Sharini Himaya | Programming – Assignment 01
manner in which algorithms are initially stated. The programmer constructs a
logical thought process for the machine to follow using modules or a complete
idea. The program is then analyzed in further detail using pseudocode.
Pseudocode connects the program's rules to the machine by using words like if,
else, and then.

Ex: Pseudocode to find the sum of two numbers

BEGIN

Input N, M

Sum = N + M

Display Sum

END

3. Flowchart: Flowcharts is a graphical tool that depicts the steps or stages that must
be inserted when running a program. Now, all the steps listed in the second stage
are given diagrammatically to make them easier to understand. The creation of
flowcharts aids in streamlining our programming process by allowing us to
establish logic and identify and correct design flows.

Sharini Himaya | Programming – Assignment 01


Figure 3 - Flowchart to print the sum of two numbers

4. Coding: Any program must be coded or developed after it has been designed. The
programmer writes the problem-solving instructions in computer language in this
stage. Every phase of the coding process is based on the data we gathered in the
previous stages. The language that is chosen relies on the needs and resources
that language offers. All syntax issues, spelling mistakes, comma absences, and
empty labels are removed throughout this process.

These are some guidelines for effective coding:

o Use meaningful names and labels of variables.


o Use simple and clear expressions.
o Modularity with emphasis on making modules generalized.
o Make use of comments and indenting to code properly.
o Try avoiding jumps in the program to transfer control.

Sharini Himaya | Programming – Assignment 01


Figure 4 - Python code to find the sum of two numbers

5. Debugging: How many times we check there is a potential that mistakes could
happen while we are coding, we delete all of the errors in the program at this
point. Here, a process known as DRY RUN is used to manually run the software
several times until all mistakes have been resolved and the system is error-free.

Common errors which might occur in the programs include:

 Un-initialization of variables.
 Reversing of order of operands.
 Confusion of numbers and the characters.
 Inverting of conditions.

Sharini Himaya | Programming – Assignment 01


6. Testing: In order to confirm the program's behavior and outcome with the
provided data, we test it in this stage by entering fake data, which includes
normal, unexpected, and invalid data. In this instance, a number of appropriate
test cases are used to test the software. It is required to create a test plan for the
program even before it is designed.

7. Final Output: Last but not the least the software is handed the TRUE DATA once
it has completed all of the aforementioned steps. Here, the programmer
anticipates successful program outcomes and complete program efficiency at the
end of testing.

8. Documentation & Maintenance: An essential step in the development of the


software is documentation which is often being neglected by the
programmers. The individuals who maintain the program and the consumers can
both benefit from documentation. This guarantees that any necessary
modifications in the future may be made easily. It is also necessary for
maintenance and redesign. Maintenance takes into account the program's
upgrading and modification for evolving circumstances and practical experience.

The two types of documentations are:


 User documentation.
 Technical documentation.

(CSE World Online 2022)


(Saeed, Asim Saeed 2018)

Sharini Himaya | Programming – Assignment 01


Big-O Notation
Big O notation is a way to describe an algorithm's speed or complexity.
Understanding how quick or slow the algorithms could operate in a project is useful. Big
O notation does not precisely depict the algorithm's speed in seconds. This is because a
variety of factors determine how long it takes an algorithm to run. The Big O notation is
instead used to compare various algorithms based on the volume of operations
(processes) they do.
The Big O notation employs three primary analytical processes;
 Best – case: the most favorable situation (1st attempt)
 Worst – case: last item or the item which is not existing
 Average – case: average of best case and worst case
Another essential consideration in the field of programming is algorithm efficiency.
Algorithm efficiency is essential for achieving the highest performance while
minimizing resource use. The effectiveness of algorithms varies depending on the
programming environment.
There are several elements that influence this, including:
 CPU Speed
 Operating system efficiency
 Memory capacity
 CPU and memory load time
 Other than this even the coding methods and the code itself can affect the
efficiency of the program.

(Big O Notation Explained with Examples, Jan 2020)

Sharini Himaya | Programming – Assignment 01


Big-O notation is and explain its role in evaluating efficiencies of
algorithms

 Computational resources: time and space

 Best, worst and average case performance

How to compare algorithms: machine-independent measure of efficiency

 Growth rate
 Complexity measure O ()
 How much time does it need
 How much memory space does it require

Algorithm is a well-defined sequence of steps, which leads to solving a certain


problem. Steps should be:

 Concrete
 Unambiguous

Best, worst and average case linear search:

 Best performance: the item we search for is in the first position; examines one
position
 Worst performance: item not in the array or in the last position; examines all
positions
 Average performance (given that the item is in the array): examines half of the
array

Sharini Himaya | Programming – Assignment 01


Binary search

Best case - item in the middle, one check

Worst case - item in the last possible division; the maximal number of times an array of
length N can be divided is log2 N

Average case: item is found after performing half of the possible number of divisions; ½
log2 N

More useful algorithm

Which is more useful?

For real time programming: the worst case

For getting a general idea of running time: average case; however, often difficult to
establish. For choosing between several available algorithms: helps to know what the best
is.

Machine Independence

The evaluation of efficiency should be as machine independent as possible.

For the time complexity of an algorithm,

 We count the number of basic operations the algorithm performs


 We calculate how this number depends on the size of the input.
 Space complexity: How much extra space is needed in terms of the space used to
represent the input as follows.

Sharini Himaya | Programming – Assignment 01


Basic operations

Basic operations are operations, which take constant time (at most time C for some
constant C). In other words, time required to perform the operation does not grow with
the size of the operands, or is bounded by a constant. If we are not sure how operations
are implemented, we have to exercise judgement: can something be in principle
implemented as a constant time operation?

For example, adding two 32-bit integers can be, but adding a list of 32-bit integers
cannot: it is going to take longer for a longer list.

(Introduction to big O notation - towardsdatascience.com 2021)

Figure 5 - Big-O Complexity Chart

Determining the efficiency of the program using Big-O Notation

Sharini Himaya | Programming – Assignment 01


Python program code for the above two algorithms
Python is an object-oriented, dynamically semantic, high-level, interpreted
programming language. Python's straightforward syntax promotes readability, which
lowers the expense of software maintenance.
Python frequently causes programmers to fall in love due to the enhanced
productivity it offers and due to the efficiency. The edit-test-debug cycle is
extraordinarily efficient because there is no compilation stage. Python scripts can be
easily debugged. On the other hand, adding a few print statements to the source code is
frequently the easiest method to debug a program due to the short edit-test-debug cycle.
(What is python? executive summary)

Python Code for the Fibonacci sequence

nterm = int(input("Number of terms:"))

n1, n2 = 0, 1
count = 0

if nterm <= 0:
print("Please enter a positive integer")

elif nterm == 1:
print("Fibonacci sequence upto", nterm, ":")
print(n1)

else:
print("Fibonacci sequence:")
while count < nterm:

Sharini Himaya | Programming – Assignment 01


print(n1)
nth = n1 + n2

n1 = n2
n2 = nth
count += 1

Figure 6 - Python code for the Fibonacci sequence

In the above given example, the student have stored the number of terms in nterm.
Then initialized the first term to 0 and the second term to 1.
As per the program if the number of terms is more than 2, it uses a while loop to find the
next term in the sequence by adding the previous two terms. We then interchange the
variables and proceed on with the process.

Sharini Himaya | Programming – Assignment 01


Figure 7 - Output of the Python Code for Fibonacci sequence

Python Code for the Factorial

Num = int(input("Input a Number:"))


factorial = 1
if Num < 0:
print("The factorial does not exist for negative numbers")
elif Num == 0:
print("The factorial of 0 is 1")
else:
for i in range(1,Num + 1):
factorial = factorial * i
print("The factorial of", Num, "is", factorial)

Sharini Himaya | Programming – Assignment 01


Figure 8 - Python code and the Output to find the Factorial of a number

In the above given example, the student have declared a variable called Num that
takes an integer as an input from the user. Then declared a variable factorial and
assigned 1. Next, checked if the user enters the number less than 1, then it returns the
factorial does not exist for a negative number (-10). If it returns false, then we check
Num is equal to 0, it returns false the control transfers to the else statement and prints
the factorial of a given number.

Sharini Himaya | Programming – Assignment 01


ACTIVITY 02

2.1 PROGRAMMING PARADIGMS


The idea of programming paradigm can be understood like this: "Programming is
a way of expressing your ideas in a form that makes it computable, which means it can
be processed or converted into other forms by a computer." Simply said, it is a set of
standards, principles, and design concepts that influence how program code is produced
and structured. Each and every programming language follows this idea. Programming
language paradigms specify how it operates. Programming languages employ paradigms
as a method to carry out operations in machine code at a higher comprehension level.
Different programming languages employ various paradigms. The decision of choosing
the most acceptable language that adheres to a suitable paradigm to write the application
will be provided to the developer. All developers must be familiar with the various
paradigm types and their characteristics in order to complete their task successfully.
These characteristics could be advantageous in some circumstances but disadvantageous
in others.
Two major categories can be used to separate programming paradigms. Based on the
distinctive properties of their programming languages and how they organize their
program code, these categories are divided.
 Imperative programming
 Structured Programming
 Procedural Programming
 Object Oriented Programming
 Database Query Language
• Declarative Programming

Sharini Himaya | Programming – Assignment 01


 Functional Programming
 Logic Programming
(Boudreau, What is a programming paradigm? 2020)

2.1.1 Procedural Programming


Procedural Programming is made up by procedures. They may also be referred to
as functions, methods, or subroutines. Even if it is referred to as functions in different
circumstances. They differ considerably from one another. A return value is not
provided by procedures, and its primary goal is to carry out a task and result in a desired
side effect. Functions, on the other hand, only have a small number of side effects and
produce an output result.
Procedural programming is the default starting point for a new programmer. This is so
that a device can be explicitly instructed by the procedural code to solve a problem in a
finite number of logical steps. This paradigm regards methods and data as two distinct
portions and employs a linear top-down methodology. The procedure section will
outline specific actions that must be taken. These procedures will be addressed in the
main program.

Characteristics of Procedural Programming


 For design and creation, procedural programming relies on a top-down approach.
 Higher-level programming languages offer predefined functions. This can be
incorporated directly into the code to perform various tasks.
 Global variables can be used in functions since it is declared outside every function in
the code.
 Data and functions are separated from one another.

Sharini Himaya | Programming – Assignment 01


 Easy to follow the logic of the program.
 By calling another function, a function can access its data.
 Parameters can be passed to functions, subroutines and procedures.
 Dividing up big programs into smaller, easier-to-manage procedures and functions.

Languages that support Procedural Programming Paradigms


• C
• C++
• Java
• Python
• Pascal
• ColdFusion
(Bhatia, What is procedural programming? [definition] - key features)

Code Snippets for Procedural Programming


The main characteristics of procedural programming are the division of the code into the
main code and the process. The software will call the procedure in the main code and
execute it there. Procedural programming being another subfield. It contains selection,
iteration, and sequence from structural programming.
A calculation function has been used here as an illustration of a procedural paradigm.
This was produced in python IDE using python language.

Sharini Himaya | Programming – Assignment 01


Figure 9-Procedural Programming with Output

A function called "calctotal" that was initially given appears in the above image. The
mechanism used by this function to calculate the sum of all the numbers in a list is
fundamental. The variable x displays the numbers in the list as part of the "For"
iteration method used to locate this. Here, the list's total will be determined by
repeatedly adding its x value (the list's integers). Later, the list was made accessible
as lists A and B containing integers. The line that needs to be written in the output is
specified in the next line's print command, and listA and listB are used as arguments
for the function. The function calctotal will be run by the two list numbers overall,
and their output will be displayed as follows.
The procedural paradigm has a top-down organizational structure. This is as a result
of the similarities to structural programming that it inherits. It utilized the "For"
iteration loop and sequence to process the code in the preceding code snippet. The

Sharini Himaya | Programming – Assignment 01


code is rather simple and uncomplicated as a whole. The procedure is stated at the
start of the code and will be invoked later.
The code snippet's division into two sections, the process and the main code, is its
most unique characteristic. The approach given in the previous image is "calctotal."
When this function is invoked both within the program and in the print command, it
will be processed. List1 and List2 variables in the code will be used in accordance
with the function calctotal. Printing of the final product will approach the second
image.

2.1.2 Object Oriented Programming


Nearly all developers utilize the basic programming paradigm known as object-
oriented programming (OOP) at a certain point in their careers. This programming
approach was created to get around the drawbacks of procedural programming. As I
indicated before, a developer first learns the procedural paradigm, but because to its
significant drawbacks, it cannot be used to create complicated applications. A
programmer can safeguard the important data components using OOP. It perceives
the parts of the program as objects. Each object has a set of data operations available
to it. OOP includes some basic programming concepts. All of these designs involve
classes and objects.

The following are some important characteristics of OOP concepts:


Class: Classes are essentially user-defined data types, to be brief. The pattern for the
organization of methods and attributes is created in classes. This blueprint is used to
create specific objects.

Sharini Himaya | Programming – Assignment 01


Object: The software application represents an object as a real-world entity. Ex: a
person, a dog, a vehicle, etc. Every object has a distinct identity and state. Attributes
and methods define an object.
Methods: Methods stand in for behaviors. Actions are carried out using methods,
which may also update an object's data or return information about it. The class
definition contains information about the method's code.
Attributes: The information that is stored is called an attribute. The Class template
defines attributes. Individual objects contain information stored in the Attributes
field when they are instantiated. The information in an object's attribute fields
determines its behavior.

There are four main principles of the OOP concept. They are:
Encapsulation: Encapsulation is the process of combining data and procedures into
a single entity.
Inheritance: This is how one class is derived from another class. The class from
which it is acquired is known as the parent class, and the inherited class is referred to
as the child class.
Polymorphism: An idea where a single object has various behaviors is what this
term refers to.
Abstraction: This is the process of hiding the detail of the information and
simplifying how it is presented.

Characteristics of Object Oriented Programming


 For design and creation, object oriented programming relies on a bottom-up
approach.
 The software code can simply be expanded with new functions and data.

Sharini Himaya | Programming – Assignment 01


 Program is separated into objects, which are also known as entities.
 In this occasion communication between objects take place through functions.
 External functions cannot access the data.

Languages that support Procedural Programming Paradigms


• C++
• Java
• Python
• Ruby
• PHP
• JavaScript
(What is object-oriented programming? oop explained in depth)

Code Snippets for Procedural Programming


Compared to procedural programming, OOP creation is more complex. This code
snippet is an example to represent methods, classes, objects, and instance properties.
The OOP concept was coded in Python IDLE using the Python language.

Sharini Himaya | Programming – Assignment 01


Figure 10-Object Oriented Programming

Figure 11-Object Oriented Programming

Figure 12-Object Oriented Programming Output

Sharini Himaya | Programming – Assignment 01


In the following figures, two classes—Person (parent class) and Employee—have been
established (Child Class). The Person class is an ancestor of the Employee class. As can
be seen in the show function in the code above, we may use the methods of the person
class through the employee class. The details() function shows how a child class can
change the parent class's behavior.

2.1.3 Event Driven Programming


Today's generation of programmers frequently uses the event-driven paradigm.
Software engineers use this language the most frequently. Event drive programming, as
the names imply, is a paradigm in which the program's flow is determined by events.
These occurrences could be anything, such a mouse or button click. These events are
followed by event-handling procedures after being watched over by code known as
event listeners.

Characteristics of Event Driven Programming


 Service Oriented: The ability to design programs specifically for services using
event-driven programming is known as service oriented programming. This
operates in the OS's background as a background application and uses a small
portion of computer's CPU resources.
 Time Driven: This is an even-driven programming sub-paradigm. This code
executes at the precise moment that was programmed earlier in the program. This
may be set to happen once every month, hour, etc. Depending on the program's
code.

Sharini Himaya | Programming – Assignment 01


 Event Handlers: Event handlers is a function that runs when a specific event is
triggered.
 Trigger Functions: This function has the code that will be executed when a
particular event happens.
 Events: Events include mouse, keyboard, and user interface, which must be
triggered in the program for them to occur. This requires user interaction with
program objects, such as clicking buttons with a mouse or selecting buttons with the
keyboard.

Languages that support Event Driven Programming Paradigms


 Visual basic.
 Visual C++
 Java.
 And usually all object oriented and visual languages.
(Ltd, Event-driven programming features 2022)

Code Snippets for Procedural Programming


To explain a code snippet for event driven paradigm a simple Calculator is created with
C# language in visual studio 2019. The following images are proof of the calculator
created and the codes used to make it work.

Sharini Himaya | Programming – Assignment 01


Figure 13-Addition

Sharini Himaya | Programming – Assignment 01


Figure 14-Clear

Sharini Himaya | Programming – Assignment 01


Figure 15-Substraction

Sharini Himaya | Programming – Assignment 01


Figure 16-Multiplication

Sharini Himaya | Programming – Assignment 01


Figure 17-Division

Sharini Himaya | Programming – Assignment 01


Figure 18-Code snippet for Event driven Programming Calculator

Figure 19-Scode snippet for Event driven Programming Calculator

Sharini Himaya | Programming – Assignment 01


Figure 20-Scode snippet for Event driven Programming Calculator

Labels, textboxes, and buttons were used to develop the calculator. The calculator's
main function was to combine the values entered in textboxes 1 and 2 and then,
when a button was clicked, to execute the two values as desired. To hold the double
data type values entered in the textboxes, 3 public variables were created. The
procedure followed by the software was to extract the values from both textboxes
and save them as double data in the public variables. Following the execution of
both stored variables in accordance with the symbol (button), the response contained
in the public variable will be converted to a string and supplied in the answer
textbox. The clear button will change all the public variables and the textbox into
empty fields.
The code snippet depicts the general structure of an event-driven diagram.
When an event is triggered by a click, event handlers will be accessible, and the
code block inside will be executed to produce a useful output. The application offers
Sharini Himaya | Programming – Assignment 01
a straight-forward route and does not allow for any process diversions. Every
component of the software must have codes delivered repeatedly as needed. If a tool
in the design view was to produce an output, it would need to be coded.
When compared to other languages, event driven programming has a few distinctive
properties. Especially the welcoming environment that is GUI-based. The simplest
tools in the software can be used by the developer to build their own GUI-based
system. It is simple to drag and drop into the design plane and then code it
appropriately thereafter. Because they will be used to produce events, the buttons are
the primary emphasis of the design view.
Other tools will primarily be utilized to add data or to display it to the user. Overall,
these technologies give developers more options. The developer must code each and
every output of the instances. Because all of the choices and loops in the software
are to be made by the developer, that means they have a big work ahead of them.
Another aspect of event-driven programming is the ease and simplicity of the
coding. In contrast to OOP principles, the majority of scripts and tools are displayed,
making them easier to use. They give a precise understanding of the code that was
utilized and the reason it was developed.
Overall, it is evident from the facts shown above that the event driven paradigm is
adopted by the majority of developers and has some of the most distinctive qualities.

Sharini Himaya | Programming – Assignment 01


2.2 DIFFERENCE BETWEEN PROGRAMMING PARADIGMS

2.2.1 Difference between Procedural and Object Oriented paradigms


Procedural Object Oriented
Program is divided into smaller parts called Program is divided into smaller parts called
functions. objects.
It follows the down approach. It follows the bottom up approach.
It doesn’t contains access modifier options. It contain access modifier options.
Data overloading is not possible. Data overloading is possible.
Based on unreal world objects. Based on real world objects.
Introducing new data and functions is complex. Introducing new data and functions is easier.
Table 3-Difference between procedural and OOP Paradigms

When looking at the similarities between these two paradigms,


 Both includes similar programming languages such as Java.
 Both of them are imperative languages.
 Both of them utilize algorithms when processing data.
 Both include procedure functions and include them later in the main code.

2.2.2 Difference between Procedural and Event Driven paradigms


Procedural Event Driven
The execution of the program is determined by The execution of the program is predetermined
the system itself. and controlled by developer.

Sharini Himaya | Programming – Assignment 01


Programmer codes certain event handlers and The code is written beginning to end by the
the program responds based on the event. programmer. Any decisions and loops are
controlled by the developer.
IT uses a normal interface to code. Involves a GUI based interface to code.
Output based on predetermined set of codes by Output based on clicks or other events.
the programmer.
Table 4- Difference between event driven and procedural Paradigm

When looking at the similarities between these two paradigms,


• Procedures are used in event handlers, during an IF and when condition different
procedures have to be given during various situations.
• Procedural paradigms can have event handlers added, which makes them compatible.
• Both event driven and procedural programs can be thought of as straight-forward task-
solving systems because they both use top-down approaches to solve problems.

2.2.3 Difference between Event driven and Object Oriented paradigms


Procedural Object Oriented
This occurs during an event. Priority is given to data, classes and objects.
This follows up a straight forward path and Allows data hiding feature and data is only
does not allow diversions. accessible by some parts in the program only.
Requires a code for each essential aspect Can utilize the same object throughout the
simultaneously as needed. application.
Table 5- Difference between event driven and OOP

When looking at the similarities between these two paradigms,


• Both the paradigms binds data and code which is common in modern language.
• Both the languages can be used simultaneously.

Sharini Himaya | Programming – Assignment 01


• The OOP ideas of encapsulation, inheritance, and polymorphism are preserved in both
programming languages.

(Differences between procedural and Object Oriented Programming, 2022)

2.3 INTEGRATED DEVELOPMENT ENVIRONMENT (IDE)


A developer can readily create many components of a program in a workable setting
using an integrated development environment, or IDE. IDEs are programs that include
complete programming functionality in a single program. This includes all of the extra
features of a bundle. The tools listed below are essential for developers and can be found
in an IDE.
 Code editor – These techniques are employed in the creation and revision of
program code. Because they operate more easily and simply than text editors, they
stand out significantly more.
 Compiler – The source code is transformed by compilers into executable code for
machines.
 Debugger – Debuggers help developers to debug their applications/programs.
 Automation tools – These help developers to automate tasks that are common.
 Errors – The IDE will figure errors and display the specific position of the issue.
The most frequent errors in IDEs are runtime, syntax, and semantic ones
 Syntax highlighting – These distinguishes the codes according to their unique
significance. Consider classes, parameters, etc.
 Bracket matching – This makes it easier to determine whether brackets are closed
and whether their indentations are correct. This can make it much easier to read
the source code.

Sharini Himaya | Programming – Assignment 01


IDEs are used to increase a developer's productivity. It speeds up the development
process and saves time and energy. It refreshes in accordance with the most recent
methods and procedures, bringing developers up to date with the most recent
technology in the process. An IDE is very beneficial to developers. Some advantages
of using IDE include the ones listed below.
 Quick setup – The developer will need to use several tools to configure,
develop, and compile source code if they lack an IDE. However, everything
may be done using IDE under one roof.
 Faster development process – In order to increase developer productivity, it
may be helpful. For instance, a change in color will immediately indicate any
coding problems. This implies that rather than having to search for the error, it
can be found immediately and solved.
 Learning – IDE is also a useful tool for education. This is as a result of its
location- and time-based updates. The developer will benefit from new
updates by better understanding current trends and other topics relating to the
IT business.
(What is IDE or Integrated Development Environments?)

2.3.1 Types of Integrated Development Environments


1. Multi- Language IDE
 Eclipse – It is a free, open-source IDE for numerous frameworks.
Although it was first developed for Java, plugins eventually allowed for
expansion. Now it supports languages including Python, C, C++, Java,
PHP, and Javascript.
 NetBeans – Free and open source IDE which provides all functions of an
IDE. Supports Java, PHPP, JS, C, C++, Python etc.
Sharini Himaya | Programming – Assignment 01
 Komodo IDE – Enterprise level IDE with a higher price point. Supports
Pearl, PHP, Ruby, Python etc.
2. IDE for mobile development
 PhoneGap and Titanium mobile from appcelerator.
3. Cloud based IDE – A thriving sector for IDEs which gives programmers access to
their codes from anyplace, which is a unique advantage.
 Nitrous – cloud based development IDE that supports Ruby, Python,
Node.Is etc.
 Cloud9 – Its supports more than 40 languages.
 Heroku – It is a cloud based PaaS system.
4. IDE specific to Microsoft and Apple
 Visual studio – Used to create apps for Microsoft platform. It supports
VB.NET, Visual C++, C#, F# and more.
 MonoDevelop – It supports visual basic etc.
 Espresso – XML, HTML, PHP, CSS, JS etc.
 compilers into executable code for machines transform the source code.
 Debugger – Debuggers help developers to debug their applications/programs.
 Automation tools – These help developers to automate tasks that are common.
 Errors – The IDE will figure errors and display the specific position of the issue.
The most frequent errors in IDEs are runtime, syntax, and semantic ones
 Syntax highlighting – These distinguishes the codes according to their unique
significance. Consider classes, parameters, etc.
 Bracket matching – This makes it easier to determine whether brackets are closed
and whether their indentations are correct. This can make it much easier to read
the source code.

Sharini Himaya | Programming – Assignment 01


IDEs are used to increase a developer's productivity. It speeds up the development
process and saves time and energy. It refreshes in accordance with the most recent
methods and procedures, bringing developers up to date with the most recent
technology in the process. An IDE is very beneficial to developers. Some advantages
of using IDE include the ones listed below.
 Quick setup – The developer will need to use several tools to configure,
develop, and compile source code if they lack an IDE. However, everything
may be done using IDE under one roof.
 Faster development process – In order to increase developer productivity, it
may be helpful. For instance, a change in color will immediately indicate any
coding problems. This implies that rather than having to search for the error, it
can be found immediately and solved.
 Learning – IDE is also a useful tool for education. This is as a result of its
location- and time-based updates. The developer will benefit from new
updates by better understanding current trends and other topics relating to the
IT business.
(What is IDE or Integrated Development Environments?)

2.3.1 Types of Integrated Development Environments


1. Multi- Language IDE
 Eclipse – It is a free, open-source IDE for numerous frameworks.
Although it was first developed for Java, plugins eventually allowed for
expansion. Now it supports languages including Python, C, C++, Java,
PHP, and Javascript.
 NetBeans – Free and open source IDE which provides all functions of an
IDE. Supports Java, PHPP, JS, C, C++, Python etc.

Sharini Himaya | Programming – Assignment 01


 Komodo IDE – Enterprise level IDE with a higher price point. Supports
Pearl, PHP, Ruby, Python etc.
2. IDE for mobile development
 PhoneGap and Titanium mobile from appcelerator.
3. Cloud based IDE – A thriving sector for IDEs which gives programmers access to
their codes from anyplace, which is a unique advantage.
 Nitrous – cloud based development IDE that supports Ruby, Python,
Node.Is etc.
 Cloud9 – Its supports more than 40 languages.
 Heroku – It is a cloud based PaaS system.
4. IDE specific to Microsoft and Apple
 Visual studio – Used to create apps for Microsoft platform. It supports
VB.NET, Visual C++, C#, F# and more.
 MonoDevelop – It supports visual basic etc.
 Espresso – XML, HTML, PHP, CSS, JS etc.

Sharini Himaya | Programming – Assignment 01


ACTIVITY 03
Ayubo drive is the company's transportation division. In Sri Lanka, it's a young travel
and tour company. It has a fleet of cars that it uses to offer different services to regular
customers. Ayubo Travels divides the services it offers into two categories: renting and
hiring. They use a particular formula to determine the cost of their services, and it varies
depending on the input data. The student created algorithms for vehicle tariff estimates
for rents and hires using the data after closely analyzing the functions supplied in the
assignment brief.

3.1 Algorithm for Rent Calculation


The pseudo code for the algorithm for calculating rent is displayed below. Vehicles have
different prices for the computation that is offered on a monthly, daily, and weekly
basis.

BEGIN RentCalc
INPUT StartDate
INPUT EndDate
INPUT DailyRate
INPUT MonthlyRate
INPUT WeeklyRate
INPUT DriverRate

TotalDays = (EndDate - StartDate) + 1


NoOfMonths = TotalDays / 30
Sharini Himaya | Programming – Assignment 01
RemainingDays = TotalDays % 30
NoOfWeeks = RemainingDays / 7
NoOfDays = RemainingDays % 7

TotalRent = (NoOfMonths * MonthlyRate) + (NoOfWeeks * WeeklyRate) +


(NoOfDays * DailyRate)
IF driver = True
TotalRent = TotalRent + (DriverCharge * TotalDays)
END IF
DISPLAY TotalRent
END

 A group of input requirements form the basis of the algorithm. Because it


needed to be simple, I eliminated a function. The start of the day count marks the
conclusion of the input command. Here, both the end date and the beginning date
are taken into account. The number of days the vehicle was utilized is calculated
by subtracting the end date from the start date and adding 1 to the result.
 •As weeks and months have special prices, the days gained are then separated into
months, weeks, and days. Division and modulus functions are used to handle this
procedure. The number of months is calculated by dividing the number of days
by 30. The modulus function will then be used to determine the remaining days.
The number of weeks is then calculated by dividing the remaining days by 7, and
the modulus (or remaining days) is obtained by subtracting the modulus value
from the remaining days.
 The entire rent amount will be determined based on the starting rates; the rates
will be determined using the number of days, weeks, and months obtained. Next,
it will be determined if a driver is present or not. If a driver was present, his daily
Sharini Himaya | Programming – Assignment 01
rate will be doubled by the total number of days. If there was no driver, it
wouldn't be taken into account. Finally the Rent amount will be displayed.

3.2 Algorithm for Day-Tour Calculation

BEGIN DayTourCalc
INPUT StartTime
INPUT EndTime
INPUT StartKMRead
INPUT EndKMRead

MaxKM = 100
MaxHours = 10
RateExtraKM = 50
WaitingRate = 100
BaseCharge = 6000

TotalHours = EndTime – StartTime


TotalKm = EndKMRead – StartKMRead
If (TotalKM>MaxKM)
ExtraKMCharge = (TotalKM - MaxKM ) * RateExtraKM
If (TotalHours>MaxHours)
WaitingCharge = (TotalHours - MaxHours ) * WaitingRate
TotalHireCharge = Basecharge + WaitingCharge +ExtraKMCharge
ENDIF

Sharini Himaya | Programming – Assignment 01


ENDIF
DISPLAY BaseCharge
DISPLAY WaitingCharge
DISPLAY ExtraKMCharge
DISPLAY TotalHireCharge
END

 Similar to Renting the day tour was done according to a single vehicle type. The
base prices and other prices may change according to the vehicle type. Few
variables regarding the start and end of the KM reading and hours are entered.
Other variables are provided with values that vary depending on the vehicle.
 Total hours and total KM are found to identify whether they have exceeded the
max hours and max Km limit. If they are exceeded, penalties including waiting
fees and extra mile fees will apply. The total hire fee will increase to include
these. Finally the required details will be displayed.

3.3 Algorithm for Long-Tour Calculation


For tours lasting longer than a day, the method listed below is developed. The variables
are tracked here as though the hiring process takes two or more days. Similar to the first
two algorithms, the figures vary depending on the type of vehicle.

BEGIN LongHireCalc
INPUT StartDate
INPUT EndDate
INPUT StartKMRead
INPUT EndKMRead
Sharini Himaya | Programming – Assignment 01
MaxKmRead = 500
BaseCharge = 20000
ExtraKMRate = 40
OvernightParkRate = 500
OvernightDriverRate = 1000
NoOfDays = 2

TotalDays = (EndDate – StartDate) + 1


TotalKM = EndKMRead – StartKMRead
IF (TotalKM> MaxKM)
ExtraKMCharge = (TotalKM - MaxKM) * ExtraKMRate
IF (TotalDays > NoOfDays)
OvernightCharge = (TotalDays * OvernightParkRate) + (TotalDays *
OvernightDriverRate)
TotalHireCharge = BaseCharge + ExtraKMCharge + OvernightCharge
ENDIF
ENDIF

DISPLAY BaseCharge
DISPLAY ExtraKMCharge
DISPLAY OverNightCharge
DISPLAY TotalHireCharge
END

Sharini Himaya | Programming – Assignment 01


 Four input statements are used to start the algorithm, and a few variables with
values are used after that. By subtracting the start and finish dates, the total
number of days is determined. The same procedure is used to take kilometer
readings.
 To determine whether the KM reading has exceeded the Max KM range and
whether the clients have intended to stay for an additional day, two if conditions
are employed. The cost will increase in accordance with these circumstances.
The total cost of the journey, additional fees for the KM readout, and overnight
fees are all displayed in the final result. The final hire charge will be given by
adding all of these.

Sharini Himaya | Programming – Assignment 01


3.4 Logical Database Diagram

Figure 21-Logical Database Diagram for the Car Rental System

The system's logical database structure is shown in the figure below. The lines depict the
relationships between the tables, including primary and foreign keys. Here, foreign keys
are utilized to extract data from a certain database so that it can be used in the
calculation. One of the most crucial components of the system is this one. These records
will be utilized to calculate the tariff and retain records pertaining to vehicle rates and

Sharini Himaya | Programming – Assignment 01


package rates. The tariffs for vehicle types and packages are kept in the below
mentioned database structures and will be used to implement functions.

Sharini Himaya | Programming – Assignment 01


3.5 Database Structure and interfaces of the system
The design process will next go on to developing the database structure. The database's
package and vehicle tables will be the most important ones. Both of these tables must be
established at first because the hire rates and rental amounts vary between vehicles and
packages. The assignment brief can be used to determine the things that should be
entered into the database.
The packages table and the vehicle table has been developed as follows in accordance
with this.

Creating Database

Figure 22-Creating Database

Sharini Himaya | Programming – Assignment 01


Figure 23-Created Database

Vehicle Table

Figure 24-Vehicle Database

Sharini Himaya | Programming – Assignment 01


Packages Table

Figure 25-Packages Database

Based on the packages for each vehicle, the data input in the above tables will be
utilized to determine various hire rates and rental rates. These two fundamental tables
will be used to calculate the three key functions listed in the brief. The table to rent, day
trips, and extended tours are shown in the following pictures.

Sharini Himaya | Programming – Assignment 01


Rent Table

Figure 26-Rent Database

Day-Tours Table

Figure 27-Day- Tours Database

Sharini Himaya | Programming – Assignment 01


Long-Tours Table

Figure 28-Long-Tours Database

3.6 Interfaces of the Car Rental System


The system will be built according to the algorithm's specifications using all available
functionalities, and data will be stored in databases using the interfaces specified below.

Sharini Himaya | Programming – Assignment 01


Vehicle Interface

Figure 29-Vehicle Interface

The vehicle interface appears in this picture above. This covers all of the data that I have
entered into the vehicle table's database. Through these textboxes, you can add data to
the vehicle table, and it will be preserved there.

Sharini Himaya | Programming – Assignment 01


Purchase Interface

Figure 30-Purchase Interface

The functions offered by this package interface are identical to those of automobiles.
The relevant textboxes data will be recorded in the backend packages database. The
database table is made available as proof by the view button. The Interfaces are
developed as you see above to illustrate the many steps in the system that calculate and
save data in databases.
To make it simpler for the agency's administrator to add and update data in the system, I
designed a car interface and a packages interface. Although it won't be visible to
customers, the administrator can still access it.

Sharini Himaya | Programming – Assignment 01


Rent Interface

Figure 31-Rent Interface

Sharini Himaya | Programming – Assignment 01


Day-Tours Interface

Figure 32-Day-Tours Interface

Sharini Himaya | Programming – Assignment 01


Long-Tours Interface

Figure 33-Long-Tours Interface

3.7 Features of an Integrated Development Environment (IDE)


Software’s used for creating applications are known as an integrated development
environment (IDE). They combines standard developer tools into a single graphical user
interface (GUI). Because several tools don't need to be manually configured and
integrated as part of the setup process, an IDE enables developers to begin developing
new apps rapidly. Additionally, since every utility is available on the same workbench,
developers don't have to spend hours learning how to use each one separately. In reality,
the majority of IDE capabilities, such as intelligent code completion and automatic code
creation, are designed to reduce coding time. When bringing on new developers, who

Sharini Himaya | Programming – Assignment 01


can rely on an IDE to familiarize themselves with a team's standard tools and
procedures, this can be extremely helpful. The IDE offers the following features, all of
which greatly aid in the creation of an application;

 Syntax Highlighting: All IDEs use a similar method known as syntax


highlighting. The developer can distinguish between distinct components of his
code, such as variables, classes, functions, according to this capability.
 Auto Completion: Another useful feature in an IDE that helps developers save
time is auto completion. There are some terms that will always be used in a
specific language. These keywords could occasionally be lengthy and broad. As
a result, developers frequently use the autocomplete tool to save time.
 Debugging: A developer could make mistakes when developing. The debugging
features of the IDE catch these problems. IDEs offer reliable debugging
capabilities that enable developers to deliberately investigate various variables
and review their code. Before the compilation, the IDE provides the error's
location and a common reason.
 Extensions – The developer has the option to customize and expand an IDE's
functionality based on their preferences. As a result, an IDE can include
additional plugins and extensions to offer more useful actions.

The IDE's primary features that assist developers in successfully and error-free
application development are listed down above.

(What is an IDE?,2019)

Sharini Himaya | Programming – Assignment 01


3.8 Text Editor and Integrated Development Environment (IDE)
An IDE which is called an open source software combines the fundamental developer
tools needed to create and test software. While A text editor is just a text editing
program. One of the most essential tools for developers to type and edit text, primarily
programming language files, is a text editor. Overall, it is evident that these built-in text
editors offer the same fundamental functionality as IDE's, namely editing and coding,
but the main distinction between an IDE and a built-in text editor is the broad variety of
features, which enable the creation of error-free applications and the ability to run them.
Text Editor IDE
Program Enables to write codes and Provides an environment to
edit them. Build high standard
applications with inbuilt
functionalities.
Functionality It focuses on the text and the Permits a developer or group
common input, processing, of developers to organize the
and output processes. It work process effectively by
accomplishes the combining various
task efficiently and is far components of a computer
simpler than IDEs. software into one complete
package.
Features Compared to IDEs, text The IDE offers a wide range
editors are simpler and of capabilities that aid in the
provide basic coding features. creation of applications of the
Text editors provide finest quality. Code
capabilities like version intelligence, auto completion,
management and syntax compilation, and other
highlighting. The fact that a functions are among these
text editor does not facilitate which offers a system with a

Sharini Himaya | Programming – Assignment 01


GUI support is another crucial GUI for creating applications.
characteristic.
Hardware Text editors demand less Need more powerful hardware
computing power and than what a text editor would
additional hardware to need. This is because
operate. compiling, debugging, and
running an application need a
lot of computing power.
Examples WordPad, Note Pad, Sublime, Visual Studio, Eclipse,
Notepad++ etc. NetBeans, XCode etc.
Table 6-Text Editor and IDE

It is evident from the above features and contrasts that text editors and IDEs differ
greatly from one another. This comparison's conclusion is that the decision of whether
to use an IDE or a text editor to create a particular application depends on the developer
and the needs of the program itself. Since both IDEs and text editors are widely used in
the IT industry, developers tend to use IDEs for much more advanced works due to the
benefits listed above.

(Khillar, Difference between IDE and text editor, 2021)

Sharini Himaya | Programming – Assignment 01


ACTIVITY 04

4.1 Graphical User Interface and Functions of the


Implemented System
The system was built in the appropriate database tables by adding the relevant records.
The development of the databases gave the system a solid foundation. During the
project's planning phase, the complete procedure was planned. The process of building
the database tables gave a clear understanding of the upcoming processes, such as
designing and coding the system.
The system's design phase was completed in visual studio 2019 IDE (C#.net). The
necessary graphical user interfaces (GUIs) for the functions included in the assignment
were made using Windows Forms. The list of GUIs created for the project is as follows:
 Menu page: Contains all of the user-accessible assignment's primary functions.

 Vehicle page: Contains the ability to examine vehicles and their details as well as
add, update, and delete vehicles for the admins use. The entered and displayed
data will have a direct connection to the database. The information entered in
this table will be used for project functions.

 Packages page: Allows administrators to view, add, update, and delete packages
from its database. The information submitted here will be utilized to compute
rates in the functions, much like the vehicle page.

Sharini Himaya | Programming – Assignment 01


 Rent Calculation page: One of the primary tasks needed for the project is this. The
customer will be able to access the data that was used to rent a car based on its
time period on the vehicles page.

 Day Tour calculation page: This is another important project function. This
determines a customer's Day rate based on their package and the vehicle they
used. The user will see all relevant data along with any additional costs.
 Long Tour calculation page: Here is where the project's final task is included.
Similar to day tours, the pricing for a long tour will be determined using the
function provided, and the user will be shown the final result along with any
additional fees.

Sharini Himaya | Programming – Assignment 01


Interface for Menu Page

Table 7-Menu Page

The Ayubo Travels menu page is depicted in the image up above. These three are the
main purposes for the project. The student left out the vehicle and packages page
because this is a user model. Three buttons are used to represent the three functions, and
clicking any of them will trigger an event handler that will lead the user to the
appropriate page.
The following image includes the codes used for the buttons which will redirect the page
to the respectful page.

Sharini Himaya | Programming – Assignment 01


Table 8-Menu Page Code

Sharini Himaya | Programming – Assignment 01


Interface for Vehicle Page

Figure 34-Interface for Vehicle Page

The data categories in the vehicle interface match those in the database, and the view
button displays the information in the database table. This task is carried out using the
data grid tool. Four buttons were utilized by the learner to access various system
features. Since they are required to store the tariff rates in the database table, these
buttons are actually used in all other interfaces.
The buttons which were used are as follows:-
 Add – Add button is used to enter data into the database.
 Update – Update button is used to change data in the database. The
primary key will be used to identify the record that has to be updated
and then the updatable content will be added in the necessary textbox.
 Delete – Delete button is used to delete a record from the table

Sharini Himaya | Programming – Assignment 01


 View – View button is used to view all the records in the database
table
Add
Button

Table 9-Code for the Add button

The above image contains the code used to add data into the vehicles table in the
database. The add button was filled with these codes and during the click the event will
run as provided and the output with be provided as mentioned in the message box result.
The same code was used in all other add buttons only the necessary variables such as the
textbox name and the row names were changed. The below image provides the message
box of a successful data entry.

Sharini Himaya | Programming – Assignment 01


Sharini Himaya | Programming – Assignment 01
Update Button

Table 10-Code for Update Button

Update button fulfills the task of editing the already entered data in the database. The
process of this feature is that the record is identified by its unique data (primary key)
and then the data which has to be updated will be added. This can be a useful technique
in various instances. The following image shows the code block for the update button.

Sharini Himaya | Programming – Assignment 01


Table 11-Update Button

Delete Button

Table 12-Code for Delete Button

Delete button deletes a whole record based on its primary key produced. The following
code block was used to fulfill this task.

Sharini Himaya | Programming – Assignment 01


Table 13-Delete Button

View Button
View button provides the simple facility of viewing the content in the database table at a
glance inside a data grid. The code used for this button is as follows.

Figure 35-Code for View Button

Sharini Himaya | Programming – Assignment 01


Figure 36-View Button

Interface for Packages Page


This is another important page in the system. The values of each and every package
along with its KMs, hours and rates are included in this database table. The GUI created
for this database will be also only accessible by the admin or any other officials from the
travel agency. The data entered in this table will be retrieved by the main three functions
to calculate their final rates. Similar to vehicle this page too includes the basic buttons to
add and manipulate data. The following image shows the interface of the package
interface.

Sharini Himaya | Programming – Assignment 01


Figure 37-Packages Interface

Interface for Rent Calculation


This is one of the most important functions in the system. Rent calculation is basically
based when a vehicle is rented. This can be calculated according to the vehicle type,
days rented and driver availability. The interface for the rent calculation was created
according to the database that was created beforehand. The data entered in the rent
calculation will be first processed to obtain the final value of the rent and then with the
acceptance of the user the record will be added to the rent table. The process of the
calculation was done with the help of a class and then the main function. The class
included all the logical and mathematical tasks which were to be done with the obtained
data. Then in the main function the class will be called and the obtained data will run

Sharini Himaya | Programming – Assignment 01


smoothly according to the prior mentioned ways. The formula was created according to
the equation provided in the brief. The code mentioned in the below images provides an
insider look of the complete process.

Figure 38-Code for Rent Calculation

Sharini Himaya | Programming – Assignment 01


Figure 39-Code for Rent Calculation

Sharini Himaya | Programming – Assignment 01


Figure 40-Interface for Rent Page Calculation

Interface for Day-Tour Calculation


The same technique used for the rent calculation will be used here. Day tours basically
show the tours that are about to last only one day with a driver. Here variables such as
max KM, Time and driver rate will be considered. The formula used for the calculation
happens in the same way as the rent calculation. The process is divided into two
categories the class and the main function. The class will include all necessary logical
and other operations and for the final answer the class and its variables will be called
and the executed in the calculate button. The codes mentioned below proves the
processing of data in the calculate button.

Sharini Himaya | Programming – Assignment 01


Figure 41-Day tour calculation code

Figure 42-Day tour calculation code

Sharini Himaya | Programming – Assignment 01


Figure 43-Day tour calculation code

Figure 44-Day tour calculation code

Sharini Himaya | Programming – Assignment 01


Figure 45-Day Tour Calculation Interface

Interface for Long-Tour Calculation


This is the final function in our system. Long tours are based upon hires which last for
more than 1 day. The variables for this calculation will be extra Km charge, extra time
rate, overnight charge etc. The process of long tours as well as day tours works in
package form. The packages are already mentioned in packages table therefore the data
from that table will be read to form the formula and solve it in long and day tour
calculation. The package will include a number of days and some other restrictions, if
these are violated in anyway then penalties will be added as extra values. The final rate
will include these extra rates added with the base charge. The same process used in the

Sharini Himaya | Programming – Assignment 01


other two functions is used here. The calculation is broken down into two forms as a
class and a main function which is the calculate button. The class performs all the
logical operations required for the final output and the calculate button will do the final
touching with the places where the results should be shown. The codes are shown in the
below image.

Figure 46-Code for Long-Tour Calculation

Figure 47-Code for Long-Tour Calculation

Sharini Himaya | Programming – Assignment 01


Figure 48-Code for Long-Tour Calculation

Sharini Himaya | Programming – Assignment 01


Figure 49-Long Tour Interface

The above shown images and interfaces provide a clear picture of the system created in
the visual studio environment. This small system created is able to calculate hire
amounts and record them in the database for customer billing and management reporting
for Ayubo drive. The created system includes of three main services provided by the
Ayubo travels and all these functions are successfully executed by the system. The
obtained final values will be saved in their respective databases. Features such as
adding, deleting, updating and viewing are entered in the system. In overall an
automatic billing and management report system was successfully built for Ayubo drive
according to their requirements provided

Sharini Himaya | Programming – Assignment 01


4.2 What is debugging?
As earlier mentioned debugging is one of the most important features available in an
IDE.
A software application or the system built by the developer has to be error free before
producing it to the client. It’s because customer satisfaction takes an upmost importance
in an organization. Building software is not an easy task; it consists of several stages
such as designing, coding, testing etc. In order to create error free software, all the code
in the software has to be tested and debugged.
Debugging is the process of fixing a bug in the software. It refers to identifying,
analyzing and removing errors. The process begins after the software fails to execute
properly as expected. Then the application is tested until the error or the bug is found.
This process can be either huge or small depending on the error level in the application.
The debugging can be performed using a third party application and these are mostly
used in huge projects. The student in this assignment used visual studio IDE which
contains a built in debugger which runs during the execution of the system.

4.2.1 Benefits of debugging


• Reports error condition immediately after detection. In Visual Studio IDE this is done
when the application is executed, the debugging process will initiate and show the bugs
along with its place and a hint.
• Provides information about the bug which help in easy fixing.
• Debugging can help the developer to save time and energy during software
development.

Sharini Himaya | Programming – Assignment 01


4.2.2 Debugging process
1. Identify the error: it is important to identify the error by the developer itself because
then it will be easy to interpret and fix.
2. Find the error location: finding the error of the error in the system
3. Analyze the error: in error analyzing two main goals are achieved. They are; checking
whether all the errors are found around an error and to make sure than the risk of any
collateral damage is fixed.
4. Proving the analysis: test frameworks are used to write automated tests.
5. Cover lateral damage: All unit testing has to be gathered in here and make sure all of
them are passed.
6. Fix and validate: fixing all errors and run all the test scripts to check whether they all
pass. In overall debugging is an important process in application development which
find bugs and errors that helps the developer to fix them.
(What is Debugging? Different Stages of Debugging | Edureka)

4.3.3 Debugging features in Visual Studio IDE


Visual studio IDE is an excellent platform to build applications and systems. This is due
to its impeccable features provided. Debugging feature tops that list. Debugging is an
important task in application development. Visual studio provides it to the developers as
a built in structure. Debugger of the visual studio itself extends a category of services
which helps in application debugging as to the developers wish. The following are few
of the debugging features available in visual studio IDE.
• Set breakpoints
Breakpoints are used when the line of code or the section of code that the developer
wants to examine in detail are selected. This is one of the basic features that shows the

Sharini Himaya | Programming – Assignment 01


reliability of debugging. A breakpoint basically points out where the debugging process
should suspend and provides the information at the values of the variables used,
memory usage and whether or not a branch of that code is processed. There are few
types of breakpoints in seen in the software. Some of them are:
1. Break when value changes – when a breakpoint is set to a non-static property setter it
will get caught when changing a property value for any objects. The same behavior can
be obtained for a single object with the help of locals.
2. Conditional breakpoint – a condition can be inserted to a breakpoint to break only in a
certain scenario. Ex: providing a loop condition or an IF condition.
3. Trace Break point – stopping the execution is the most common action during a
breakpoint hit. However there is a choice that a developer can make to print some traces
in the output window without halting.

• Step over code to skip functions


There are functions are methods that will be used in the visual studio. This feature
makes the debugger to skip any functions or methods in the system. In this way the
developer can quickly get to debug the code he/she is interested in.
• Step into a property
By default the debugger skips over managed properties and fields but this feature can be
customized according to the developers wish and override this behavior. This means by
choosing the step into specific the developer can choose an available option.
• Run to a point in your code using the mouse
This is similar to the run into specific location feature but can be easily performed by the
click of a mouse. An execution can be done from one point of line in the code.
• Run to cursor option

Sharini Himaya | Programming – Assignment 01


This command helps to start a debugging process and sets a temporary breakpoint on the
current line of code. In this way the developer can edit the code and help him/her to
quickly set a temporary breakpoint and start the debugger at the same time.
• Edit code while debugging
This is another useful feature seen in visual studio. A code can be edited during a
debugging session. For an instance when a bug is found in the code, the debugging
process will stop and point it out. Here the developer can make the necessary changes in
the code and resume the debugging process.
• Inspect variables with the Autos and Locals windows
In autos window the variables with their values and types are visible. This window
shows all the variables in the current line or the preceding line. On the other hand the
Locals window shows the variables that are currently in scope. Through this feature the
developer can check for the variables used in the system.
• Inspecting an exception
During an exception, the debugger takes the developer to the line of error. Here the
developer can either fix it or it provides hints to help fix the error. The developer can
also view error details and add a watch from the exception helper.
The above mentioned features are the most used and basic debugging functions seen in
visual studio. These features are massively useful to developers to carry on with their
system development tasks. The following images provided below shows some of these
feature mentioned above.
(First look at the debugger - Visual Studio (Windows) | Microsoft Docs, no date)

Sharini Himaya | Programming – Assignment 01


4.3.4 Usage of debugging to develop more secure and robust
applications

Debugging and security


Debugging process is massively important in application development. There are many
advantages of debugging a system. The most important one out of all of them is having
an error free application but debugging also plays a huge role in creating a secured
system as well.
Debugging is all about finding bugs and rectifying them. The very direct line in which
the security of debugging is concerned is when unauthorized people find for bugs to get
into the system. When an application is developed it is continually examined and
maintained.
This is one of the steps in the SDLC model. Providing updates often can help to fix the
bugs caused in the system with time. Debugging these errors can help the system to be
secured from hackers or any other unauthorized access. It is advised to debug the system
before deploying it, the reason behind this is to find the errors and bugs in the system
not only to make it successful but also to make it secure.
Debugging of the system has to be done by the developer himself in a secure and a
trustworthy machine. This is because that debugging is a sensitive action and it should
be done in a protective environment by a trustworthy person or by the developer
themselves.
This makes sure that the debugging process is free from any potential risks.
Secured debugging when adding extra processes
Some developers use another person’s system processes in their project. This makes
things easier for the developer but the risk posed by them is high. The IDE in default
sends a security warning when attaching an untrusted user’s process in the system. The
developer can ignore this but still it provides a reasonable threat to the system. The
Sharini Himaya | Programming – Assignment 01
debugging of the system has the ability to identify such errors and security risks in the
system. By this it obviously proves that debugging is securing the application that is
being built.
The same goes when a project is directly downloaded and attached to the IDE. The
debugging process will be able to find the security risks in here and will notify the
developer.

4.5 Coding standards


Coding standards are a collection of rules and guidelines that determine the
programming style, procedures and methods for a programming language.
Coding is similar to a lifestyle for developers. Every applications and systems include
huge number of codes behind them and behind each of these codes there is a developer
with a unique style of action. Coding phase is where the application is born. The main
goal of the coding phase is to code the system design planned in the design phase using
a high level language and then to unit test the code.
Coding cannot be done as everyone wants. There is a specific guideline and a standard
to be followed in a good programming code. These standards are followed by all
developers world-wide. Coding standards has several advantages which help the
developers as well as other parties in the system development process. The following
are the purposes of having coding standards;
• Coding standards gives a unique appearance to the codes written by different
developers.
• Helps to improve readability and maintainability while lessening the complexity of the
code.
• Ability to reuse the code and detect error easily
• Increases efficiency of the programmers and provides a good practice of coding.
Sharini Himaya | Programming – Assignment 01
There are several coding standards that are used world-wide. Some depend based on
languages and some depend on the organizations. However there are some basic coding
standards that are required to use while coding. The following are some of them.

1. Naming local variables, global variables, constants and functions.


• Variables have to be meaningful, understandable and related to the content.
• Local variables should be named using camel case lettering (localData) whereas global
variables names should start with a capital letter (GlobalData). Constants name should
be formed using capital letters only.
• It’s recommended to avoid digits in variable names.
• The function of the function must define the reason of using the function.

2. Indentation
Using indentation in the code can make the code easier to read and understand. It’s the
developer’s responsibility to create a code which can be easily readable by another
fellow developer. These are few methods to properly adjust the space in the program.
• A space has to be provided after a comma between two function arguments.
• A new nested block has to be properly indented and spaced
• Indentation has to be provided at the beginning and at the end of each block

3. Proper error/exception handling and return values has to be provided


All functions has to be provided with an output. If it works properly then a success
result will appear and if it’s not then error result will appear.
The image provided above can be taken as an example for that too. The code block
inside else if provides the result when the code is successfully executed and if it’s not
then the code block inside else will be executed.

Sharini Himaya | Programming – Assignment 01


4. Using a simple coding style
Using a complex code to create a system will make the maintenance and debugging
process difficult and expensive. Moreover it has to be understood by every other
developer so that any changes in the future can be made easily.

5. Having a well-documented code


A code block should be properly commented for understanding. Adding comments in
the code is a good practice and is helpful to have a better understanding.

6. One statement per line


It’s well recommended to add one statement per line while coding to make it convenient
to the readers to understand the code and to keep the code clean.
As shown in the above images the student has used one code per line which makes it
clear to read the codes and understandable.
There are several other standards other than the above mentioned but still the foundation
of all them begins with these simple guidelines. It’s evidently proved that the above
mentioned standards are followed by the student and used in the system. The images
provided are a helping factor to show that by following the coding standards properly
the system and the codes used in it will be easy to understand and read.

How coding standards affect an individual and the team


Coding standards provide a certain quality and uniqueness to a project. It was introduced
to the IT industry for a reason. If everyone was allowed to code as they want the team as
well as the individual will be in a messy situation. All in all having these guidelines
have kept the developers under a certain margin and it has allowed the IT industry to
move forward. An individual may come up with the question of why is this coding

Sharini Himaya | Programming – Assignment 01


standards used? Several people will answer that question as to keep the code clean and
understandable, but it’s more than that. Following these coding standards helps an
individual to evolve himself/herself as a better programmer and as for the team, it
produces a better understanding and a strong relationship between them. Therefore, if
anyone says that coding standards are used to provide only a better look then it’s wrong.
Coding standards in a team
As I have mentioned earlier, coding standards depend from organizations and different
languages. Under this topic, we can add new criteria by saying that the coding
guidelines can be added for a certain team too. In a long term project environment, the
team members discuss and end up with a certain guidelines to be used during the project
Coding process
This prevents the situation of large, complicated and messy codebases. In order to write
a well -structured code, the developers has to be work together to build up some
standards for their team. By doing this, it eases the understanding of the code for any
developers on the team.
Maintaining good code quality within a team requires a well consistent effort and a great
focus from the developer’s team to meet the quality goal. Without proper conventions it
would be hard for the whole team to cope up with the standards and it can extend the
development time as well as the complexity of the project structure. On the other hand,
if the codes are properly done according to the standards the team will be able to attain
the maximum productivity level in coding area which will save up time as well as the
standard of the team.
Another important feature of using standards is that it develops the team spirit and helps
the team move forward in one single rhythm to have a smooth workflow. Furthermore if
these standards were not implemented or not followed then it will be hard task to
maintain and debug the code in the near future. The following are few benefits of
following coding standards as a team.

Sharini Himaya | Programming – Assignment 01


Coding standards as an individual
Coding standards are not only used in team works but also in individual works too. As a
team, developers will get together and end up in a coding guideline to follow and
achieve the end goal but as an individual everyone has to practice it whenever we code.
This is because following the correct method from the beginning will increase our
potential of becoming successful developers in the future.
Practicing the basic coding standards can train an individual to future team work
environment and help him/her to adhere to a set of rules and guidelines. The importance
of following a specific standard can also help an individual have a better understanding
of the work his doing. Other than these following are some other benefits obtained
through following a coding standard;
• Enhanced efficiency – all individual developers spend a long time in solving issues
related to debugging and testing which could have been prevented with proper
implementation of standards and guidelines. Therefore following these code standards
will help a developer in latter part of the project to identify errors and debug codes
easily.
• Risk of project failure – many projects fail due to issues regarding system
development. During an individual project, a person would not be able to cope up with
extra budget or time. Therefore, it’s highly recommended to use coding standards in the
beginning to at least reduce the little risks and threats which might later face as huge
problems.
• Minimizes complexity – if the code is complex then using coding standards may help
to reduce the complexity and the errors

With the above mentioned points and explanation it’s clear that following a code
standards can help an individual prosper their coding skills which will be helpful in a
Sharini Himaya | Programming – Assignment 01
professional level. As a whole in the conclusion I would like to say that following a
coding standard can massively benefit both an individual and as well as a team to move
forward in the IT industry. The comparisons and explanations shown above prove that
coding standards are necessary for team as well as for the individuals too.

Sharini Himaya | Programming – Assignment 01


CONCLUSION
The module Programming is a module that cover about the process of writing a set
of instructions that instruct a computer how to carry out a task. Computer programming
languages like JavaScript, Python, and C++ is often used for programming.
By addressing a variety of tasks and activities, the programming module
assignment was successfully finished with a significant amount of work, satisfying all
the learning outcomes. The student has shown the importance of algorithms while
mentioning how to build a successful algorithm. Explanations were done for
Pseudocodes, algorithms, and the python language. How to use Big-O notation and how
it relates to algorithms is also illustrated.
Following that, the student discussed programming paradigms and their
characteristics. The links between the object-oriented, procedural, and event-driven
paradigms were thoroughly analyzed. The three programming paradigms' structures
and distinctive features were explained along with short snippets of their code.
The student has already developed a simple Ayubo drive system to compute
vehicle pricing for rental- and hire-based events. Functionalities including add, delete,
and update is successfully added to the databases and GUIs. In accordance with the
function specified in the brief, the computations are successfully carried out.
The system worked as intended, and all the buttons and calculations were completed
correctly.
The assignment provides evidence of the functioning algorithms and the results.
The student then goes into detail about the debugging procedure in the Visual Studio
IDE and how it helps to create an application that is more reliable and safe. The
relevance of coding standards was also covered in the final section, which came to a
conclusion by pointing out how using code standards may benefit both an individual and
Sharini Himaya | Programming – Assignment 01
a team effort.
This assignment is mainly targeting to cover the areas given above. Apart from that
while studying the module we also made ourselves thorough in building applications.
We also learnt about the software requirements. I/O requirements and other computer
system components used for various employees at different levels in organizations to
build a system etc.

Sharini Himaya | Programming – Assignment 01


REFERENCES

1. (Lonny Meinecke) What is an Algorithm in Programming? - Definition, Examples


& Analysis (no date) Study.com | Take Online Courses. Earn College Credit.
Research Schools, Degrees & Careers. Available at:
https://study.com/academy/lesson/what-is-an-algorithm-in-programming-
definition-examples-analysis.html (Accessed: November: 01, 2022)
2. Muskan (2022) most important type of algorithms, GeeksforGeeks. Muskan.
Available at: https://www.geeksforgeeks.org/most-important-type-of-algorithms/
(Accessed: 01 November, 2022)
3. Characteristics of an Algorithm. There are some characteristics which… | by
Shlok Bhatt | Medium, 2019. Available at:
https://medium.com/@bhattshlok12/characteristics-of-an-algorithm-49cf4d7bcd9
(Accessed: 01 November, 2022)
4. What is an Algorithm in Programming? - Definition, Examples &amp; Analysis
(no date) Study.com | Take Online Courses. Earn College Credit. Research
Schools, Degrees &amp; Careers. Available at:
https://study.com/academy/lesson/what-is-an-algorithm-in-programming-
definition-examples-analysis.html (Accessed: November 8, 2022)
5. Saeed, A. (2018) Asim Saeed, Techyv.com. Available at:
https://www.techyv.com/article/stages-steps-involved-programming/
(Accessed: November 2, 2022)

Sharini Himaya | Programming – Assignment 01


6. (no date) “What is 'Pseudocode'.” Available at:
https://economictimes.indiatimes.com/definition/pseudocode
(Accessed: November 3, 2022)

7. Dry run - testing - higher computing science revision - BBC bitesize (no date)
BBC News. BBC. Available at:
https://www.bbc.co.uk/bitesize/guides/zg4j7ty/revision/3#:~:text=A%20dry%20ru
n%20is%20the,print%20out%20of%20the%20code

(Accessed: November 3, 2022)

8. Big O Notation Explained with Examples (no date). Available at:


https://www.freecodecamp.org/news/big-o-notation-explained-with-examples/
(Accessed: 11 September 2021)
9. What is python? executive summary (no date) Python.org. ThePSF. Available at:
https://www.python.org/doc/essays/blurb/ (Accessed: November 3, 2022)
10. Andrew Jamieson (no date) Introduction to big O notation -
towardsdatascience.com, Introduction to Big O Notation. Towards Data Science.
Available at: https://towardsdatascience.com/introduction-to-big-o-notation-
820d2e25d3fd (Accessed: November 3, 2022)
11. Boudreau, E. (2020) What is a programming paradigm?, Medium. Towards Data
Science. Available at: https://towardsdatascience.com/what-is-a-programming-
paradigm-1259362673c2 (Accessed: December 16, 2022)
12. Bhatia, S. (no date) What is procedural programming? [definition] - key features,
Hackr.io. Available at: https://hackr.io/blog/procedural-programming (Accessed:
December 16, 2022)

Sharini Himaya | Programming – Assignment 01


13. What is object-oriented programming? oop explained in depth (no date)
Educative. Available at: https://www.educative.io/blog/object-oriented-
programming (Accessed: December 21, 2022)
14. Ltd, A.A. (2022) Event-driven programming features, UK Essays. UK Essays.
Available at: https://www.ukessays.com/essays/computer-science/eventdriven-
programming-features-6167.php (Accessed: December 21, 2022)
15. Differences between procedural and Object Oriented Programming.
GeeksforGeeks. (2022, June 28) from https://www.geeksforgeeks.org/differences-
between-procedural-and-object-oriented-programming/ (Accessed: December 21,
2022)
16. What is IDE or Integrated Development Environments? (no date) Veracode.
Available at: https://www.veracode.com/security/integrated-development-
environment (Accessed: December 26, 2022)
17. What is an IDE? (no date) Red Hat - We make open source technologies for the
enterprise. Available at: https://www.redhat.com/en/topics/middleware/what-is-
ide (Accessed: December 26, 2022)
18. Khillar, S. (2021) Difference between IDE and text editor, Difference Between
Similar Terms and Objects. Available at:
http://www.differencebetween.net/technology/difference-between-ide-and-text-
editor/#:~:text=full-featured%20IDE.-
,A%20text%20editor%20is%20simply%20a%20computer%20program%20and%
20a,to%20build%20and%20test%20software. (Accessed: December 26, 2022)

Sharini Himaya | Programming – Assignment 01

You might also like