7048-1712772218517-Unit-01 Programming Assignment - 2024
7048-1712772218517-Unit-01 Programming Assignment - 2024
Assessor Feedback:
LO1. Define basic algorithms to carry out an operation and outline the process of programming an
applicate
Pass, Merit & Distinction Descripts P1 P2 M1 D1
LO2. Explain the characteristics of procedural, object-orientated and event-driven programming, conduct a
Integrated Development Environment (IDE).
LO4. Determine the debugging process and explain the importance of a coding standard.
Pass, Merit & Distinction Descripts P5 P6 M4 D4
* 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.
Page | 1
Sakuntha Sankalpa Programming – 01
Assessor Feedback:
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.
Page | 2
Sakuntha Sankalpa Programming – 01
Important Points:
Page | 3
Sakuntha Sankalpa Programming – 01
STUDENT ASSESSMENT SUBMISSION AND
DECLARATION
When submitting evidence for assessment, each student must sign a
declaration confirming that the work is their own.
Student name: Assessor name:
S A D Sakuntha Sankalpa Lasanthika Jayasekara
Plagiarism
Plagiarism is a particular form of cheating. Plagiarism must be avoided at all
costs and students who break the rules, however innocently, may be
penalized. It is your responsibility to ensure that you understand correct
referencing practices. As a university level student, you are expected to use
appropriate references throughout and keep carefully detailed notes of all
your sources of materials for material you have used in your work, including
any material downloaded from the Internet. Please consult the relevant unit
lecturer or your course tutor if you need any further advice.
Student Declaration
Student declaration
I certify that the assignment submission is entirely my own work and I fully
understand the consequences of plagiarism. I understand that making a false
declaration is a form of malpractice.
Page | 4
Sakuntha Sankalpa Programming – 01
Unit 01: PROGRAMMING
Assignment Brief
Student Name/ID
S A D Sakuntha Sankalpa/E208856
Number
24/04/2024
Issue Date
Submission Date 20/01/2025
Submission Format
The assignment submission is in the form of the following.
The submission should be in the form of an individual written report
written in a concise, formal technical style using single spacing and
font size 12.
Student has to submit the complete GUI System with the database.
LO4. Determine the debugging process and explain the importance of a coding standard
Page | 5
Sakuntha Sankalpa Programming – 01
Transferable skills and competencies developed
Computing-related cognitive skills :
Demonstrate knowledge and understanding of essential facts,
concepts, principles and
theories relating to computing and computer applications
Use such knowledge and understanding in the modelling and
design of computer- based
systems for the purposes of comprehension, communication,
prediction and the understanding of trade-offs
Recognise and analyse criteria and specifications appropriate to
specific problems, and
plan strategies for their solutions
Critical evaluation and testing: analyse the extent to which a
computer-based system
meets the criteria defined for its current use and future development
Methods and tools: deploy appropriate theory, practices and tools
for the design, implementation and evaluation of computer-based
systems.
Page | 6
Sakuntha Sankalpa Programming – 01
Contextual awareness, e.g. the ability to understand and meet
the needs of individuals,
business and the community, and to understand how workplaces
and organisations are
governed.
Page | 7
Sakuntha Sankalpa Programming – 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, …….
Fn = F n-1 + F n-2
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 and carry out an analysis of writing the code phase by discussing the potential
challenges faced.
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
algorithms and critically evaluate their efficiencies using Big-O notation.
Page | 8
Sakuntha Sankalpa Programming – 01
Activity 2
Compare and discuss 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) and critically
evaluate the code samples that you have given above in relation to their structure and
the unique characteristics.
Grifindo Lanka Toys is a small-scale Toy building company which is in Sri Lanka and
currently they have 20 employees working at this company. Grifindo Lanka Toys is the Sri
Lankan branch of Grifindo Toys Company which is in UK and previously they have hired your
freelance company to develop their payroll system and now they are hiring you again to
develop their leave management system for the Sri Lankan branch, Grifindo Lanka Toys
Company.
Specifications for the leave management system as follows,
This leave management system has two user roles, and they are Employee and Admin, and they
are having two separate desktop applications to interact with the centralized database. Developer
can consider the centralized database as a local database for the development purposes.
Page | 9
Sakuntha Sankalpa Programming – 01
Functional requirements for the Employee and Admin as follow.
1. Employee Application.
Employee should be able to login to the system with the employee number
and the given password.
Note: - Normally an employee has 14 annual leaves, 7 casual leaves for a year
and 2 shorts leaves per month. Employee can apply casual leaves as they want
before their defined roaster starts. Annual leaves can be applied before 7 days
prior to the leave date. Short leave duration is 1 hour and 30 minutes and can
be applied for upcoming time slots.
Employee can view the status of applied leaves (Whether applied leaves
are approved or not).
Employee can view their remaining leaves and history of applied leaves.
2. Admin Application
Admin should be able to define the number of annual leaves, casual leaves for
a year and 2 short leaves per every month for every employee. (Newly joined
employees will less number of leaves compared to permanent employees)
Admin should be able to define the roaster starting time and end time for
each employee.
Page | 10
Sakuntha Sankalpa Programming – 01
Admin should be able to approve or reject applied leaves of each employee.
Activity 3
3.1. Write the complete pseudocode for the employee apply leave function of the above
system. Use the visual studio IDE (using C#.net) to implement the above two applications.
Ideally there should be two separate classes for the above two applications and the developer
can decide the methods which need to include in those classes. Design the suitable database
structure for keeping the data of the above system.
3.2. 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 two small GUI systems for the above scenario and those two
applications should be complete functional systems with all the functions which has
described in the above scenario with the database structure which has designed in
activity 3.
4.2 Examine 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 Explain and 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.
Page | 11
Sakuntha Sankalpa Programming – 01
Reading:
Aho, A. V. et al. (1987) Data Structures and Algorithms. 1st Ed. Addison-Wesley. Hunt,
A. et al. (2000) The Pragmatic Programmer: From Journeyman to Master. 1st Ed.
HN Global:
HN Global HN Global (2021) Reading Lists. Available at:
https://hnglobal.highernationals.com/learning-zone/readin
g-lists
Page | 12
Sakuntha Sankalpa Programming – 01
Content
Page | 13
Sakuntha Sankalpa Programming – 01
s
Activity 01..................................................................................................................................................................15
Explanation for Computer algorithms...................................................................................................................16
characteristics of good computer algorithm...........................................................................................................16
The Fibonacci and Factorial Number Algorithms...................................................................................................17
The programming process.....................................................................................................................................19
Challenges to be faced in programming process...................................................................................................22
Taking a Sample Number and dry run above fibonaci and factorial number series..............................................22
Big O notation........................................................................................................................................................24
Python Code of financial numbers........................................................................................................................25
Python Code of factorial numbers.........................................................................................................................26
Evaluate the implementation of an algorithm in a suitable language...................................................................27
relationship between the written algorithm and the code variant........................................................................29
Activity 02..................................................................................................................................................................29
Programming paradigms.......................................................................................................................................30
Coding examples of programming paradigms.......................................................................................................41
Critically evaluating the source code of an application that implements the procedural, object-orientated and
event-driven paradigms........................................................................................................................................47
Activity 03..................................................................................................................................................................48
pseudocode for the employee apply leave function of the system.......................................................................48
The database structure of Grifindo Lanka Toys leaves management system........................................................50
features of an Integrated Development Environment (IDE)..................................................................................51
Evaluate the use of the Visual Studio IDE for my application development contrasted with not using an IDE.....52
GUI applications of Grifindo Lanka Toys................................................................................................................54
debugging process and the features available in Visual studio IDE for debugging................................................65
Coding Standards in Application Development.....................................................................................................67
Why Coding Standards Are Necessary...................................................................................................................68
References.................................................................................................................................................................69
Page | 14
Sakuntha Sankalpa Programming – 01
Acknowledgement
I would like to express my sincere gratitude to Ms. Lasanthika Jayasekara for her guidance and support throughout
this programming module. Her expertise and dedication have been invaluable in helping me understand the
concepts and complete this assignment successfully. Thank you for your encouragement and for fostering an
environment of learning and growth.
Introduction
This assignment is part of the programming module, focusing on the fundamental concepts and techniques
essential for developing software applications. Throughout this module, various programming paradigms,
algorithms, and data structures were explored, providing a solid foundation in coding practices. This document
outlines the steps taken, the methodologies applied, and the results achieved during the completion of the
assignment, highlighting the key learning outcomes and challenges encountered.
Page | 15
Sakuntha Sankalpa Programming – 01
Activity 01
In Computer Science, an algorithm is a list set of instructions, used to solve problems or perform tasks,
based on the understanding of available alternatives.
Algorithms are more than just programming, they are specifications for performing calculations, data
processing, automated reasoning or decision making for example (non-exhaustive list).
To this extent, it is necessary to understand what it means for an algorithm to be correct, and to accurately
solve the problem at hand. (Cross and Cross, 2022)
Correctness
The algorithm should correctly solve the problem it was designed to address. This means it
produces the expected output for all possible valid inputs.
Efficiency
The algorithm should use resources such as time (speed) and space (memory) efficiently. This
is often measured in terms of time complexity (how the runtime scales with the size of the
input) and space complexity (how the memory usage scales with the size of the input).
Generality
A good algorithm should work across a wide range of inputs and not just for specific cases. It
should be flexible enough to handle variations in the input size and type.
Scalability
The algorithm should perform well even as the size of the input data grows significantly.
Scalability ensures that the algorithm can handle large-scale problems without a drastic
Page | 16
Sakuntha Sankalpa Programming – 01
increase in resource usage.
Robustness
The algorithm should be able to handle unexpected or unusual inputs gracefully, including
edge cases and potential errors in the input data. It should fail gracefully if an error occurs.
Maintainability
The algorithm should be written in a way that is easy to modify and update. This includes
using clear naming conventions, modular design, and comprehensive documentation.
Optimality
The algorithm should provide the best possible solution to the problem, given the constraints.
In some cases, this means finding the most efficient solution, while in others, it might mean
finding the most accurate or precise result.
Portability
The algorithm should be designed in a way that can be implemented on different platforms or
environments with minimal modification.
Sorting Algorithms
o Bubble Sort
o Merge Sort
o Quick Sort
Search Algorithms
o Linear Search
o Binary Search
Machine Learning Algorithms
o K-Means Clustering
o Decision Tree
Dynamic Programming Algorithms
o Fibonacci Sequence
o Knapsack Problem
Page | 17
Sakuntha Sankalpa Programming – 01
(Gillis, 2022)
The Fibonacci and Factorial Number Algorithms
BEGIN
INPUT num,
FUNCTION fibonaci(n)
IF n == 1 THEN
RETURN 0
ELSE IF n == 2 THEN
RETURN 1
ELSE
SET fib TO fibonaci(n-1) + fibonaci(n-2)
RETURN fib
END IF
END FUNCTION
END
A factorial of a number, written as n!, is the product of all positive integers less than or equal to
that number. For example, the factorial of 4 (written as 4!) is 4 times 3 times 2 times 1,
4! = 4 x 3 x 2 x 1 = 24.
fact(n) = 1 * 2 * 3 … * n
Page | 18
Sakuntha Sankalpa Programming – 01
Factorial number series Display using Pseudo code
BEGIN
INPUT: num
result = 1
For x from 1 to num:
result = result * x
PRINT result
END FOR
END
Definition. The (SDLC) can be defined as the system and structured process by means of which the
quality of software is improved, in minimal production time and lowest cost possible. The (SDLC) is
directed towards the development process of high-quality software that fulfills and even surpasses
customers’ expectations and requirements.
All programming involves creating something that solves a problem. The problems can range from
something of great scientific or national importance, through to something as trivial as relieving personal
boredom! This section describes one approach to solving such problems - think of it as a rough guide to
the things you should do (Bham.ac.uk, 2020)
In fact, this stage should really be named as identification of the solution because in fact what is
being attempted here is to determine precisely what it is that one is seeking to achieve.
o Requirements
o Specifications
Requirements
In fact, this stage should really be named as identification of the solution because in fact what is
being attempted here is to determine precisely what it is that one is seeking to achieve.
Specifications
The second step is to then look at the list of requirements and to decide of it precisely what your
solution must do to meet it. There are again, as have been discussed earlier, often a large number
of options available to solve a single issue; here, your target is to choose which of those options
you prefer. Thus, you are attempting, in a somewhat accurate way, to define precisely the nature of
the action of your final program.
2) Design a solution
Once you've identified the things required to solve your problem, and specified what form your
solution will take, the next step is to work out just how you're going to turn that specification into a
working program. This is usually the hardest task!
As mentioned before, a program is simply a list of steps describing to the computer what it should
do. A design is simply a higher-level description of those steps. In effect it's a program written as
if the computer was a person. So, it doesn't have to completely spell out every step - because
humans know how to do a lot of things already and have a lot of common sense, meaning that they
can work the simple steps out for themselves. It also doesn't have to be written in any special
programming language - English will do (although people often use special notations like
pseudocode or flow charts and diagrams for the more complicated sections.
Programming is the act of describing your design to the computer. It is giving commands to the
computer using a suitable language (programing language).
o Coding
o Compiling
o Debugging
Coding
Page | 20
Sakuntha Sankalpa Programming – 01
Coding is the process of converting the design into an actual application written in some form of
programming language. (C#, python, Dart, Java, JavaScript)
Compiling
In fact, compilation means the conversion of the program written in some or the other
programming language to the instructions formed by the combination of 0’s and 1’s which can be
easily understood by the computer. This is necessary because the chip that makes computer work
only understands binary machine code - something that most humans would have a great deal of
trouble using since it looks something like: This is necessary because the chip that makes your
computer work only understands binary machine code - something that most humans would have a
great deal of trouble using since it looks something like:
01110110
01101101
10101111
00110000
00010101
Debugging
What is debugging?
Debugging is the process of finding and fixing errors or bugs in the source code of any software.
When software does not work as expected, computer programmers study the code to determine
why any errors occurred. They use debugging tools to run the software in a controlled
environment, check the code step by step, and analyze and fix the issue. (Amazon Web Services,
Inc., n.d.)
Software testing is the act of checking all the relevant activities conducted with the purpose of
identifying whether the specific software program meets the needed level of quality and
functionality or not. The process verifies if there were any mistakes or holes and if the result of the
application is to the organization’s expectations before the software is deployed and available for
use.
Software testing is the process of evaluating and verifying that a software product or application
does what it’s supposed to do. The benefits of good testing include preventing bugs and improving
performance. (IBM, 2019)
Page | 21
Sakuntha Sankalpa Programming – 01
Identify the Problem
Design a solution
Design Complexity: - This is perhaps the biggest challenge one can face when creating a design:
achieving the best
Technology Choices: - Selecting the appropriate technologies and frameworks is crucial and challenging.
Integration Issues: - Ensuring that different components of the system will integrate seamlessly can be
tough.
Syntax and Semantics: - And in special the understanding of the syntax and semantics of the programming
language can’t be a problem for a developer.
Logical Errors: - Bugs that result from logical errors in the code can be hard to identify and fix.
Time Management: - Balancing speed and accuracy in coding is often a significant challenge.
Version Control: - Properly managing code versions and changes can be difficult,
Automated vs. Manual Testing: - Deciding when to use automated tests versus manual tests can be
challenging.
Comprehensive Testing: - Ensuring all parts of the application are thoroughly tested can be time-
consuming.
Taking a Sample Number and dry run above fibonaci and factorial number series
Page | 22
Sakuntha Sankalpa Programming – 01
1. Fibonacci Numbers
First, I input “10” which is equal to “num”, and I wrote the function “fibonaci(n)”. “n” is the
parameter of the fibonaci function.
I created if, else statements like this (if n = 1 return 0 and if n = 2 return 1). If those statements are
false “fib” variable equal to “n-1” plus “n-2” then return “fib” and close the function
E.g. –
INPUT num,
FUNCTION fibonaci(n)
IF n == 1 THEN
RETURN 0
ELSE IF n == 2 THEN
RETURN 1
ELSE
SET fib TO fibonaci(n-1) + fibonaci(n-2)
RETURN fib
END IF
END FUNCTION
After that I create a for loop. Its range is 1 to num. the “num” value is 10
then “x” value is pass to the parameter “n”
E.g. –
2. factorial numbers
Page | 23
Sakuntha Sankalpa Programming – 01
BEGIN
INPUT: num
result = 1
For x from 1 to num:
result = result * x
PRINT result
END FOR
END
I input “10” as the “num”. After that created a variable as “result = 1”
After That I created a for loop, it range is “1” to “10”.
The “x” values are multiplied with the “rusalt” value
It outputs are: - 1, 2,6 ,24, 120, 720, 5040, 40320, 362880, 3628800
n n!
1 1
2 2
3 6
4 24
5 120
6 720
7 5040
8 40320
9 362880
10 3628800
Big O notation
Big(O) notation is considered as the main objective of my research to evaluate the time complexity
as well as space complexity of the algorithm. In other words, it contributes as a way of assessing
how well an algorithm 'performs' and how much storage and computing resources it consumes.
Big O notation is a powerful tool used in computer science to describe the time complexity or
space complexity of algorithms. It provides a standardized way to compare the efficiency of
different algorithms in terms of their worst-case performance. Understanding Big O notation is
essential for analyzing and designing efficient algorithms. (geeksforgeeks, 2018)
Simply Big O notation is used to calculate algorithm’s time complexity and space complexity
E.g.-
1) Constant Time O (1)
Constant time complexity: it is a scenario where the time of running an algorithm does not change
even with a variation in the size of the input data.
Page | 24
Sakuntha Sankalpa Programming – 01
Example: Accessing an element in an array by index.
2) Linear Time O (n)
where the algorithm's runtime grows linear with the input size.
Example: Iterating through all elements in a list.
3) Logarithmic Time O (log n)
Logarithmic time complexity, where the algorithm's runtime grows logarithmically with the input
size.
Example: Binary search in a sorted array.
4) Quadratic Time O(n2)
Quadratic time complexity, where the algorithm's runtime grows quadratically with the input size.
Example: Simple sorting algorithms like bubble sort, insertion sort.
5) Linearithmic Time – O (n log n)
The runtime grows in a combination of linear and logarithmic rates.
Example: Efficient sorting algorithms like mergesort and heapsort.
6) Cubic Time – O(n3)
The runtime grows cubically with the input size.
Example: Certain dynamic programming algorithms.
7) Exponential Time – O(2n)
The runtime grows exponentially with the input size.
Example: Solving the traveling salesman problem using brute force.
8) Factorial Time – O(n!)
The runtime grows factorially with the input size.
Example: Solving the traveling salesman problem by evaluating all permutations.
(freeCodeCamp.org, 2018
Python Code of financial numbers
Time complexity:
Therefore, the overall time complexity of the fibonaci code is = O(1) + O(1) + O(2n) + O(2n)
= Bog-O(2n)
according to the above graph the time complexity is in horrible range. It is the worst case
space complexity:
Function Call Stack - Each recursive call to “fibonaci(n)” adds a new frame to the call stack.
In the worst case, the maximum depth of the call stack will be” n”. Therefore, the space
complexity due to the call stack Big-O(n)
Page | 26
Sakuntha Sankalpa Programming – 01
rusalt =rusalt*x
print(rusalt)
Time complexity:
Initialization - “rusalt=1” This initializes the variable “rusalt”. This is also a constant time
operation, Big-O(1)
Loop - “for x in range(1, num + 1):” The loop runs from 1 to “num”. The number
of iterations “num” so the loop run “num” times Big-O(n)
Multiplication and Print: “Rusalt = rusalt*1” inside the loop the multiplication operation
is performed. Which is Big-O(1).For each iteration
Therefore, the overall time complexity of the factorial code is = O(1) + O(1) + O(1) +O(n)
= Big-O(n)
according to the above graph the time complexity is in fair range. It is good
Space complexity:
Input Reading - “num = int(input(“Enter The Number :”))” this line reads an
integer input from the user the space used by “num” is O(n) as it stores a single integer value.
Initialization - “rusalt=1” This initializes the variable “rusalt” to 1. The space used by
“rusalt” is also O(1) as it stores a single integer value.
Loop - “for x in range(1, num + 1):” The loop runs from 1 to “num” The loop
variable “x” also requires O(1) space, as it stores a single integer value at any point in time.
Multiplication and Print – “result = result * x:” Inside the loop, the multiplication
operation does not require additional space beyond what is already used by “result” and “x”.
The result of the multiplication is stored back in “result”, which remains O(1) space.
according to the above graph the space complexity is excellent. It is too good
Algorithm assessment requires a number of procedures, and it differs based on an algorithm’s nature and
the chosen programming language. Here's a general approach:
Page | 27
Sakuntha Sankalpa Programming – 01
Understanding the Algorithm
o Clarity of Purpose - Before you start working with an algorithm, ensure that you really
know what is expected of the algorithm. What challenge does it address? The expected
inputs and the expected outputs, also known as the forecasted input or output, must be
specified.
o Step-by-Step Breakdown - Split the given algorithm into steps/ instructions or write in the
pseudocode form. This is helpful in transforming it in code in the future.
o Ease of Implementation - If the speed of the algorithm’s development and its intelligibility
is the most important requirement, then, perhaps, it is better to use Python or JavaScript.
o Community and Libraries - Deliberate on the word environment of the language. For
instance, Python has numerous libraries for data science and machine learning making it
perfect for the related algorithms.
Implementation
o Writing Code - In most cases, the pseudocode is strictly translated into a particular
programming language. Organizations must aim to adhere to such aspects as writing clear
code, avoiding confusing variable names and using consistent code style.
o Edge Cases - Apply the algorithm with conclusion to cases when the input is empty,
contains exceptional values or is in any other way problematic.
o Comments and Documentation - Two, make comments where one describes the purpose of
understanding complex parts, and the third part of documentation is to describe the general
approach.
o Performance Testing - If necessary and for higher data volumes, it is possible to check the
algorithm in terms of its desired characteristics.
o Comparison - The above implementation can then be compared to others that has been
known for correctness and efficiency.
Optimization
o Refactor - Always try to reduce the amount of code needed to solve a problem, but make
sure this doesn’t automatically translate into making the code less readable.
o Time and Space Complexity - Critical of the performance of the algorithm, including its
time and space complexity. Stabilize where possible but in case of need increase efficiency
of resource usage.
Page | 28
Sakuntha Sankalpa Programming – 01
The relationship between a written algorithm and its code variant can be understood as follows: The
relationship between a written algorithm and its code variant can be understood as follows:
Algorithm as a Blueprint
The algorithm is a simple working out of strategic logically orderly planned concept formula or set
of procedures to run a business. It can be stated mainly in plain or pseudocode and defines the
steps necessary for a desired result to be obtained. It is simply an algorithm which is written in
logical format without being tied to the specific language of programming.
Therefore, the written algorithm is fundamental while the code variant is the representation of such a
concept in a given programming language.
Activity 02
P3 Discuss what procedural, object orientated and event driven paradigms are; their characteristics and the
relationship between them.
Programming paradigms
Page | 29
Sakuntha Sankalpa Programming – 01
Programming paradigms are fundamental approaches to programming that dictate how developers
conceptualize and structure their code. We can think of them as the guiding philosophies or blueprints
for writing code because they offer a unique lens through which to view and solve problems.
These paradigms shape the way programmers think about and structure their code. By understanding
different paradigms, you can gain new insights into writing more efficient, readable, and maintainable
code. (datacamp.com, n.d.)
(GeeksForGeeks, 2018)
Imperative paradigm
Imperative paradigm is the first programming paradigm that was developed. By this paradigm a program
is defined as a clear set of instructions inputted to a computer and made of sequences.
Therefore, the source code of imperative languages contains a list of instructions, which describe
particulars of operations to be done – and when – to yield a specific result. In other words, it is possible to
change the values stored in the variables, when the program is running. To control the commands,
controlling structures including loops or branches are integrated in the program.
These are the best-known imperative programming languages: (Java, Pascal, C, C#, C++, Python)
Declarative paradigm
Order of expression or statements or the replication of a statement would not have any impact in
declarative programming. Declarative programming can be further categorized into constraint
programming, logic programming and constraint logic programming. Prolog, SQL and embedded SQL are
some of the well-known examples of declarative programming languages. Tools are provided to
programmers in declarative programming to allow abstraction of the implementation and to help in the
concentration of the issue. (Techopedia.com, n.d.)
Declarative programming language can also be implemented in various fields and some examples are
given below.
Database Query Languages (SQL, XQuery)
Markup Languages (HTML, XML)
Logic Programming (Prolog, Datalog)
Functional Programming Languages (Haskell, Lisp)
Domain-Specific Languages (DSLs)
Procedural programming is a programming paradigm that focus on the use of reference to procedures, it’s
a practice of breaking systems into small regulatory modules known as procedures or functions. Every
procedure include a set of steps that are used to accomplish simple tasks and this will aid in compiling and
dividing the processes. In procedural programming, the control flow depends on sequences, decisions, and
loops; therefore, it is easy to understand and solve. Some of the examples of procedural programming
languages are C and Pascal and in this paradigm of programming the problems under consideration are
divided into sub-problems on the basis of a top-down approach.
Procedural Programming can be defined as a programming model which is derived from structured
programming, based upon the concept of calling procedure. Procedures, also known as routines,
subroutines or functions, simply consist of a series of computational steps to be carried out. During a
program’s execution, any given procedure might be called at any point, including by other procedures
or itself. (GeeksForGeeks, 2019)
Sequence of Execution: -
Instructions are executed in a linear sequence, following a top-to-bottom approach. This makes the
program flow straightforward and easy to follow.
Parameter Passing: -
Procedures can accept inputs, known as parameters, and return outputs. This allows for the reuse
of code with different data.
Control Structures: -
Page | 31
Sakuntha Sankalpa Programming – 01
Procedural programming relies heavily on control structures like loops (“for”,” while”)
conditions
(“If” “Switch”) and Jumps (“goto”) to control the flow of the program.
Top-Down Approach: -
Development often follows a top-down approach, where high-level functionality is defined first,
and then detailed by breaking it down into smaller procedures.
Versatility: -
Thus, procedural programming is a very flexible paradigm that enables developing very diverse
coding projects with rather dramatically different aims. Procedural programming languages are
available for almost all sorts of development projects ranging from software and web development
and therefore there is always a procedural programming language that can help one to achieve his
or her intended goals.
Simplicity: -
Procedural programming is a relatively simple approach to computer programming. This is why
many developers start working with procedural programming languages, as they provide a
foundation for coding that the developer can apply as they learn other languages, such as an
object-oriented language.
Accessibility: -
It should also be noted that the most commonly used programming languages come with
procedural programming as a basis, which is why there are many references for a beginner who
dreams of knowing them. This also encompasses those paid courses that are available including
the free online resources and communities you can visit when you encounter these challenges with
help in fast tracking your development.
Complexity: -
While procedural programming languages have the advantage of simplicity, this results in a
problem when one is trying to develop intricate programs. Sometimes, it might be better to choose
a language with the object-oriented approach when working on more detailer’s projects.
Troubleshooting: -
The use of global data in procedural programming languages can make it challenging to identify
the source of errors in your code. This can cause a complex debugging process, adding time to
your development schedule.
Troubleshooting: -
The use of global data in procedural programming languages can make it challenging to identify
the source of errors in your code. This can cause a complex debugging process, adding time to
your development schedule.
Object-oriented programming (OOP) is a computer programming model that organizes software design
around data, or objects, rather than functions and logic. An object can be defined as a data field that has
unique attributes and behavior. (Gillis, 2021)
(www.javatpoint.com, n.d.)
Objects
An object is a real-world element in an object–oriented environment that may have a physical or a
conceptual existence.
Objects can be modelled according to the needs of the application. An object may have a physical
existence, like a customer, a car, etc., or an intangible conceptual existence, like a project, a
process, etc.
Methods
Methods are functions that objects can perform. They are defined inside a class that describe the
behaviors of an object. Each method contained in class definitions starts with a reference to an
instance object. Additionally, the subroutines contained in an object are called instance methods.
Programmers use methods for reusability or keeping functionality encapsulated inside one object
at a time.
Attributes
indicate the state of an object. In other, they are traits that define classes. Objects have data in the
field of attributes. These kinds of attributes are owned by the class and they are developed when
one is creating the class template.
Encapsulation
Encapsulation is a mechanism that allows us to bind data and functions of a class into an entity. It protects data and
functions from outside interference and misuse. Therefore, it also provides security. A class is the best example of
encapsulation.
(Muniz, 2023)
The encapsulation principle states that all important information is contained inside an object and only
select information is exposed. The implementation and state of each object are privately held inside a
defined class. Other objects do not have access to this class or the authority to make changes. They are
only able to call a list of public functions or methods. This characteristic of data hiding provides greater
program security and avoids unintended data corruption. (Gillis, 2021)
Encapsulation in programming is used to improve code maintainability, security, and flexibility. It enables
the bundling of data and methods that operate on that data within a single unit (i.e., a class or object),
making it easier to manage and understand (StudySmarter UK, n.d.)
Page | 34
Sakuntha Sankalpa Programming – 01
Abstraction
(Pankaj, 2022)
Abstraction occurs when a programmer hides any irrelevant data about an object or an instantiated class to
reduce complexity and help users interact with a program more efficiently. The term abstraction vs
encapsulation can describe the process of hiding some of the information contained in an object or class,
but it may also refer to the object itself. An abstraction is any named entity that contains a selection of
data and behaviors specific to a particular usage of the originating entity.
Process Abstraction
It reduces complexity
It avoids delicacy
Eases the burden of maintenance
Increase security and confidentially
Inheritance
The concept allows us to inherit or acquire the properties of an existing class (parent class) into a newly
created class (child class). It is known as inheritance. It provides code reusability.
Page | 35
Sakuntha Sankalpa Programming – 01
(Gautam, n.d.)
Code reusability
Efficiency
ease of maintenance
modification
modularity
organization.
Single Inheritance.
Multiple Inheritance.
Multilevel Inheritance.
Hierarchical Inheritance.
Hybrid Inheritance.
Polymorphism
Page | 36
Sakuntha Sankalpa Programming – 01
The word polymorphism is derived from the two words i.e. ploy and morphs. Poly means many and
morphs means forms. It allows us to create methods with the same name but different method signatures.
It allows the developer to create clean, sensible, readable, and resilient code.
(www.javatpoint.com, n.d.)
The above figure best describes the concepts of polymorphism. A person plays an employee role in the
office, father and husband role in the home.
What is polymorphism?
Polymorphism is the ability for something to take on many forms. In terms of a programming language
exhibiting this characteristic, we can create class objects that are inherited from the same parent class and
have the same names but different behaviors. Variables and functions also exhibit polymorphic behavior
in OOP by using a single interface with different underlying forms. This increases the language's ability to
reuse the same lines of code on multiple occasions. (App Architecture, n.d.)
Types of polymorphism
Compile-time polymorphism.
Runtime polymorphism.
Advantages of polymorphism
It helps programmers reuse the code and classes once written, tested and implemented. They can
be reused in many ways.
Single variable names can be used to store variables of multiple data types (Float, double, Long,
Int etc.).
Polymorphism helps in reducing the coupling between different functionalities.
Page | 37
Sakuntha Sankalpa Programming – 01
Encapsulation: -
o Objects can hide their internal state and require all interaction to be performed through an
object's methods, which provides a clear structure.
Reusability: -
o Objects and classes can be reused across different programs.
Maintainability: -
o Code is more manageable and easier to modify when changes are needed, thanks to
encapsulation and modularity.
Simplification: -
o By abstracting complex realities, OOP allows for simplified interfaces and interactions.
Flexibility: -
o Objects can be treated as instances of their parent class rather than their actual class,
allowing for dynamic method binding and more flexible code.
Teamwork: -
o OOP facilitates division of labor in a team, as different members can work on different
objects or classes independently.
Learning Curve: -
o OOP concepts like inheritance, polymorphism, and abstraction can be difficult for
beginners to understand.
Overhead: -
o Creating and managing objects can introduce overhead and increase complexity, especially
in simple applications.
Efficiency: -
o OOP can sometimes lead to less efficient performance due to the abstract layers and the
extra memory used by objects.
Development Time: -
o Initial design and development can take longer due to the need for planning out the object
structures and interactions.
Speed: -
o The use of objects can slow down a program compared to procedural programming due to
the additional processing needed to manage them.
Event driven programming is an approach to programming that is based on new events of the user such as
mouse clicks, key press or outputs from sensors, or messages from other programs. Event-driven
programming is a programming technique employed by programmers in graphical user interfaces and
other applications that address certain actions to be performed as a result of users’ input such as (user
clicks).
Event-driven programming (EDP) is a programming paradigm where external events determine the flow
of program execution. These events come in different shapes: user actions (e.g., button clicks, keyboard
inputs), system events (like a finished file download), messages from other programs, sensor outputs, etc.
(Quix.io, 2023)
Page | 38
Sakuntha Sankalpa Programming – 01
(Quix.io, 2023)
Service Oriented
Service oriented in one of the features of event driven programming that is used to write programs
that are made for services, and it takes does not slow down the computer as service oriented only
consume little of the computer processing power and usually services run in the background of
OS.
Time driven
In event driven processing, time is a paradigm, it is a code that operates on a time frame and time
is a particular code that operates on a particular time, this is a set to do task at a certain time, for
instance, once a day, once a week or once a month. For instance, the windows update is an
example of a time-driven activity, which the user takes at a specified time to check and download
the update.
Trigger functions
Trigger functions in event-driven programming are a function that decide what code to run when
there are a specific event occurs, which are used to select which event handler to use for the event
when there is specific event occurred.
Events
Events are mouse, keyboard, and user interface, which events must be initiated in the program to
occur; these imply that the user interacts with an object in a program; for instance, by clicking a
button using a mouse or hitting a button using a keyboard among others.
Page | 39
Sakuntha Sankalpa Programming – 01
Advantages of using event driven programing.
Real-time Processing: -
It allows programs to process real-time events efficiently, which is essential for applications like
gaming, embedded systems, and IoT devices.
Maintainability: -
This modularity also makes it easier to update and maintain the code, as changes in one part of the
program are less likely to impact other parts.
Adaptability: -
EDP systems can easily adapt to new types of events, making them flexible to changing
requirements or new features.
Difficult Debugging: -
Debugging can be challenging due to the asynchronous nature of event handling. Events can occur
in an unpredictable order, making it hard to trace issues.
Example code and their output for the represent Procedural programming paradigm
Python: -
Page | 41
Sakuntha Sankalpa Programming – 01
Encapsulation
I define a class called “Person” with an “__init__” method that initializes two private
attributes: “__name” and “__age”.
The “get_age” method returns the value of the private “__age” attribute.
The “set_age’ method allows us to update the “__age” attribute if the provided age is greater
than 0.
I create an instance of the “person” class named “p” with tha name “Amal” and an initial age
of 30
I print the current age using “p.set_age()”, which outputs 30.
Next, I set the age to 35 using “p.set_age(35)”
After this update, I print the age again, which now outputs 35.
Finally, attempt to set the age to -5 using “p.set_age(-5)”, However, since the provided age
is not greater than 0, the age remains unchanged.
Abstraction
Page | 42
Sakuntha Sankalpa Programming – 01
Example code and there output for the represent abstraction
Inheritance
Page | 43
Sakuntha Sankalpa Programming – 01
Example code and there output for the represent Inheritance
Python -
Polymorphism
Page | 44
Sakuntha Sankalpa Programming – 01
Example code and their output for the represent Polymorphism
Python -
I’ve defined a base class called “Animal”. This class has a method called “make
_sound()”, which prints “Generic animal sound” when called.
Next, I’ve defined two subclasses “dog” and “cat”. Both of those subclasses are inherited
from the “Animal” class.
The “dog” class overrides the “make_sound()” method. When I create an instance of “dog”
and call its “make_sound()” method, it will print “woof”
Similarly, the “cat” class also overrides the “make_sound()” method. When I create an
instance of “cat” and call its “make_sound()” method, it will print “meow”
Finally, I’ve created a list called “animals” containing instance of both “dog” and “cat”.
The loop literates through each animal in the list and call its “make_sound()” method
Page | 45
Sakuntha Sankalpa Programming – 01
Example python code -
Its output –
Importing tkinter
o The first line “import tkinter an tk” impots the “tkinter” module and assign
it the alias “tk”.
o “tkinter” is standard python library for GUI applications.
Creating a GUI window
o “Root = tk.Tk()” creates the main application window.
o “Root.title(“Event Driven Example”)” seats the title of the window.
Widgets
o “label = tk.label(root, text =”Enter your name :”)” create a label
widget with specified text
o “entry = tk.Entry(root)” creates an input field (entry widget) where the user can type their
name.
o “button =tk.Button(root, text="Submit",
Page | 46
Sakuntha Sankalpa Programming – 01
command=update_label)” creates a button widget with the label “Submit” and
associates it with the “update_label” function.
Layout
o “pack()” is used to organize widgets within the window. It arranges them vertically with
padding “pady” between them
Event handling
o The “command=update_label” parameter in the button widget specifies that when
the button is clicked, the “update_label” function should be called.
Critically evaluating the source code of an application that implements the procedural, object-
orientated and event-driven paradigms
To critically evaluate the source code of an application that implements procedural, object-oriented, and
event-driven programming paradigms, it's essential to analyze the code structure, characteristics, and the
strengths and weaknesses of each paradigm.
1. Procedural Programming
Characteristics -
Procedural programming is centered around the concept of procedure calls, where the program is divided
into functions or routines that operate on data. This paradigm emphasizes a linear top-down approach and
treats data and procedures as separate entities.
Strengths-
Simplicity: Procedural code is often straightforward and easy to understand, especially for
beginners.
Modularity: The division of code into procedures promotes modularity, making it easier to
manage and maintain.
Reusability: Functions can be reused across different parts of the program, reducing redundancy.
Weaknesses -
Data Exposure: Data is often exposed globally, leading to potential security issues.
Limited Reusability: While functions can be reused, the paradigm does not inherently support the
reuse of code structures in different contexts.
Difficulty in Managing Complexity: As applications grow, procedural code can become
unwieldy and harder to manage due to its linear nature.
OOP focuses on encapsulating data and behavior into objects, which represent real-world entities. Key
principles include inheritance, polymorphism, and encapsulation.
Strengths -
Data Abstraction: OOP allows for data hiding, enhancing security and reducing the risk of
unintended interference.
Reusability: Inheritance enables code reuse across different classes, reducing redundancy and
improving maintainability.
Modularity: Code is organized around objects, making it easier to understand and manage
complex systems.
Weaknesses -
Complexity: OOP can introduce complexity in design and implementation, particularly for new
developers.
Performance Overhead: The abstraction layers can lead to performance issues, especially in
resource-constrained environments.
3.Event-Driven Programming
Characteristics -
Event-driven programming revolves around the concept of events, where the flow of the program is
determined by user actions or other events. This paradigm is commonly used in graphical user interfaces
(GUIs) and asynchronous programming.
Strengths -
Responsiveness: Applications can respond to user inputs and events in real-time, enhancing user
experience.
Decoupling: Event-driven architectures promote loose coupling between components, making
systems easier to modify and extend.
Scalability: This paradigm is well-suited for applications that require handling multiple events
simultaneously, such as web applications.
Weaknesses -
Debugging Difficulty: The asynchronous nature of event-driven programming can complicate
debugging and tracking the flow of execution.
State Management: Managing the state across different events can be challenging, leading to
potential inconsistencies.
Conclusion
In evaluating the source code of an application that employs these three paradigms, it is crucial to consider
the specific use case and requirements of the application. Each paradigm offers distinct advantages and
challenges that can significantly impact the application's performance, maintainability, and user
experience. A well-structured application may leverage the strengths of each paradigm while mitigating
their weaknesses, resulting in a robust and efficient system.
procedural object-orientated event-driven
Page | 48
Sakuntha Sankalpa Programming – 01
In procedural code, functions or Consider the use of classes, Event-driven code responds to
procedural are the main building objects and inheritance. events (user inputs, system
blocks. events, etc.).
Assess whether the application’s Evaluate the design or classes Check how events are handled
procedural code is well-structured, whether they encapsulate data whether through callback,
with logical flow and minimal and behavior effectively. listeners, ore event driven
redundancy. architecture.
Look for any global variables or Look for proper use of Evaluate the responsiveness and
side effects that might impact inheritance, polymorphism, and efficiency of event handling.
maintainability. interfaces.
Activity 03
Page | 49
Sakuntha Sankalpa Programming – 01
P4 - Write a program that implements an algorithm using an IDE.
START
ELSE IF leave type !="Annual" && leave type !="Casual"&& leave type !="Short" THEN
Display a message: "Invalid leave type."
END the function
ELSE IF leave = = "Annual" && start date < 7 days from today THEN
Display a message: "Annual leave must be requested at least 7 days in advance."
END the function
ELSE IF leave = = "Short" && duration > 1 hour and 30 minutes THEN
Display a message: "Short leave cannot exceed 1 hour and 30 minutes."
END the function
ELSE
Display an error message: "Failed to apply for a leave. Please try again later."
END
Page | 50
Sakuntha Sankalpa Programming – 01
Visual studio IDE (C#.net) Implementation of the above algorithms
Page | 51
Sakuntha Sankalpa Programming – 01
The database structure of Grifindo Lanka Toys leaves management system
Page | 52
Sakuntha Sankalpa Programming – 01
implement in Microsoft SQL Server management Studio
Code Editor
Page | 53
Sakuntha Sankalpa Programming – 01
Provides syntax highlighting, auto-completion, and error detection, making it easier to write and
understand code.
Debugging Tools
Allows you to set breakpoints, inspect variables, and step through code, which helps in identifying
and fixing bugs.
Code Navigation
Offers features like go-to-definition, find references, and code folding, which make it easier to
navigate large codebases.
Refactoring Support
Provides tools for renaming variables, extracting methods, and other refactoring tasks, helping
you improve code quality and maintainability.
Integrated Terminal
Includes a terminal or command-line interface within the IDE, so you can run commands without
leaving the development environment.
Project Management
Helps organize and manage project files, dependencies, and configurations in a structured manner.
Real-Time Collaboration
Some IDEs offer features for real-time collaboration, allowing multiple developers to work on the
same code simultaneously.
Language Support
Often comes with support for multiple programming languages and frameworks, making it
versatile for different types of projects.
Evaluate the use of the Visual Studio IDE for my application development contrasted with not
using an IDE
Page | 54
Sakuntha Sankalpa Programming – 01
Code Navigation and Writing
o Visual Studio provides efficient code navigation tools, allowing developers to quickly find,
understand, and modify code. Features like IntelliSense (code completion), code snippets,
and AI-assisted development tools (such as GitHub Copilot) enhance productivity.
o Contrast: Without an IDE, developers might struggle with manual code navigation, leading
to slower development and more errors.
Testing Tools:
o Visual Studio offers comprehensive testing tools, including unit testing, code coverage
analysis, and load testing.
o Developers can ensure code quality and catch issues early.
o Contrast: Without an IDE, setting up and running tests becomes more cumbersome.
Activity 04
Page | 55
Sakuntha Sankalpa Programming – 01
GUI applications of Grifindo Lanka Toys.
Employees Application
Login page
Employees can login using the given password and employee number. The password and
employee number have created Admin. Its user interface is like this
If the username and password, you entered are correct or incorrect. This message boxes will show
Page | 56
Sakuntha Sankalpa Programming – 01
Apply leaves page
Page | 57
Sakuntha Sankalpa Programming – 01
Employees can apply for leave using this page. employee can see a leave is approved or reject
Page | 58
Sakuntha Sankalpa Programming – 01
Dashboard page
When you enter your employee number you can see if your applied leaves have been approved or
rejected and holidays and available leaves can show
Page | 59
Sakuntha Sankalpa Programming – 01
Dashboard page code
Admin Application
Page | 60
Sakuntha Sankalpa Programming – 01
Home page
Admins can add new employees. Admin can decide what employee number and password is. the interface
is like this
Page | 61
Sakuntha Sankalpa Programming – 01
Add new employees page code.
Page | 62
Sakuntha Sankalpa Programming – 01
If you press Approve this message box will show.
Page | 63
Sakuntha Sankalpa Programming – 01
Leave history page
When you enter your employee number. you can see your applied leaves have been approved or rejected
and holidays and available leaves can show
Page | 64
Sakuntha Sankalpa Programming – 01
Add new holidays page.
Page | 65
Sakuntha Sankalpa Programming – 01
Add new holidays page codes.
Page | 66
Sakuntha Sankalpa Programming – 01
P5 Explain the debugging process and explain the debugging facilities available in the IDE.
Activity 4.2 Examine 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.
debugging process and the features available in Visual studio IDE for debugging
Breakpoints
Set breakpoints at specific lines of code to pause execution and inspect variables, call stacks, and other
information.
Step Into (F11): This command allows you to step into a method or function call. If you’re paused on a
line with a method call, pressing F11 will take you inside that method to see its execution.
Step Over (F10): Use this command to execute the current line of code and move to the next line. If the
current line contains a method call, it won’t step into that method; instead, it will execute it and move on.
Step Out (Shift + F11): When you’re inside a method (after using Step Into), Step Out will take you back
to the calling method. It’s useful when you want to skip the details of the current method and return to the
higher-level context.
Run to curser
When you are editing code (rather than paused in the debugger), right-click a line of code in your app and
choose Run to Cursor (or press Ctrl + F10). This command starts debugging and sets a temporary
breakpoint on the current line of code. For more details on this feature and similar navigation features,
Page | 67
Sakuntha Sankalpa Programming – 01
(Mikejo5000, n.d.)
Page | 68
Sakuntha Sankalpa Programming – 01
Inspect variables with the Autos and Locals windows
In the Autos window, you see variables along with their current value and their type. The Autos window
shows all variables used on the current line or the preceding line (In C++, the window shows variables in
the preceding three lines of code. Check documentation for language-specific behavior). For more
information on using these windows, (Mikejo5000, n.d.)
Variables like holiday, date, and leave_type are named in a way that reflects their purpose, ensuring
readability.
However, some names (e.g., guna2GradientButton1_Click) could be more descriptive to indicate the
button's purpose.
2. Indentation
Use consistent indentation to improve readability.
Page | 69
Sakuntha Sankalpa Programming – 01
3. SQL Query Construction
4. Try-Catch-Finally Block
4. MessageBox Usage
Informative messages (e.g., "Added New Holiday" and "error") are displayed to the user, which improves
user experience.
However, the error message could be more specific to assist in debugging.
Page | 70
Sakuntha Sankalpa Programming – 01
5. Database Operations
The cmd.ExecuteNonQuery() command executes the SQL query for inserting data.
However, con.Open() is called after creating the SqlCommand object, which might not follow optimal
execution flow.
7. Error Handling
The catch block does not provide detailed error information, which might hinder debugging.
Maintainability: Consistent code is easier to maintain, debug, and enhance. This reduces the time
and effort required for new team members to get up to speed.
Collaboration: With a shared understanding of coding practices, team members can collaborate
more effectively and avoid misunderstandings.
Quality: Adhering to coding standards can help in catching potential bugs early and improving the
Page | 71
Sakuntha Sankalpa Programming – 01
overall quality of the software.
Readability: Writing code according to standards makes it easier for the individual to understand
their own code later, especially when revisiting it after some time.
Efficiency: With established standards, individuals spend less time figuring out how to write or
format their code, allowing them to focus more on solving the actual problems.
Error Reduction: Consistent practices help in minimizing errors and improving debugging
efficiency, as patterns in code become more predictable.
References
Page | 72
Sakuntha Sankalpa Programming – 01
Upadhyay, S. (2023). What Is An Algorithm? Characteristics, Types and How to write it | Simplilearn.
[online] Simplilearn.com. Available at:
https://www.simplilearn.com/tutorials/data-structure-tutorial/what-is-an-algorithm#:~:text=An
%20algorithm%20is%20a%20set.
Huang, S. (2020). What is Big O Notation Explained: Space and Time Complexity. [online]
freeCodeCamp.org. Available at: https://www.freecodecamp.org/news/big-o-notation-why-it-matters-and-
why-it-doesnt-1674cfa8a23c/.
javatpoint (2011). Java OOPs Concepts - Javatpoint. [online] www.javatpoint.com. Available at:
https://www.javatpoint.com/java-oops-concepts.
Stack Overflow. (n.d.). oop - What is polymorphism, what is it for, and how is it used? [online] Available
at: https://stackoverflow.com/questions/1031273/what-is-polymorphism-what-is-it-for-and-how-is-it-used.
Neubauer, T. (2023). The what, why and how of event-driven programming. [online] Quix.io. Available
at: https://quix.io/blog/what-why-how-of-event-driven-programming#:~:text=Event%2Ddriven
%20programming%20(EDP).
Page | 73
Sakuntha Sankalpa Programming – 01