Programming Paradigms Project: Procedural, OOP, Event-Driven
VerifiedAdded on 2022/02/07
|18
|3047
|208
Project
AI Summary
This assignment delves into the characteristics of procedural, object-oriented, and event-driven programming paradigms, offering a comprehensive understanding of each. The student analyzes a suitable Integrated Development Environment (IDE) and explains the core concepts, characteristics, and relationships between these paradigms. The project involves implementing basic algorithms within an IDE, exemplified by a student management program built using the event-driven paradigm, complete with user interface screenshots and code explanations. The assignment also addresses the debugging process, detailing debugging facilities available in the IDE, and underscores the importance of coding standards for software development. The student covers syntax, logic, semantic, and runtime errors, and how to use debugging tools in Visual Studio.

Table Contents
I. Introduction:
In this assignment, I will talk about the characteristics of programming in procedural,
object-oriented and event-driven. Execute algorithms in code with the IDE, write
programs and explain the code. Identify debugging procedures and debugging facilities
available in the IDE. Coding standard and the benefits of coding standard rules.
II. LO2 Explain the characteristics of procedural, object-oriented and event-driven
programming, conduct an analysis of a suitable Integrated Development
Environment (IDE)
A. Give explanations of what procedural, object-oriented and event-driven paradigms
are; their characteristics and the relationship between them. (LO2 – P2)
1. What is the programming paradigm?
- Programming paradigm is an approach to solve problem using some programming
language or also we can say it is a method to solve a problem using tools and
techniques that are available to us following some approach. There are lots for
programming language that are known but all of them need to follow some strategy
when they are implemented and this methodology/strategy is paradigms. Apart from
varieties of programming language there are lots of paradigms to fulfil each and every
demand.
Page 1
I. Introduction:
In this assignment, I will talk about the characteristics of programming in procedural,
object-oriented and event-driven. Execute algorithms in code with the IDE, write
programs and explain the code. Identify debugging procedures and debugging facilities
available in the IDE. Coding standard and the benefits of coding standard rules.
II. LO2 Explain the characteristics of procedural, object-oriented and event-driven
programming, conduct an analysis of a suitable Integrated Development
Environment (IDE)
A. Give explanations of what procedural, object-oriented and event-driven paradigms
are; their characteristics and the relationship between them. (LO2 – P2)
1. What is the programming paradigm?
- Programming paradigm is an approach to solve problem using some programming
language or also we can say it is a method to solve a problem using tools and
techniques that are available to us following some approach. There are lots for
programming language that are known but all of them need to follow some strategy
when they are implemented and this methodology/strategy is paradigms. Apart from
varieties of programming language there are lots of paradigms to fulfil each and every
demand.
Page 1
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

- Procedural programming is a method of the programming which has a support of
splitting the functionalities into a number of procedures. In procedural programming,
a large program is broken down into smaller manageable parts called procedures or
functions. Here, priority is given on functions rather than data. In a procedural
programming language, a program basically consists of a sequence of instructions
each of which tells the computer to do something such as reading inputs from the
user, doing the necessary calculation, displaying output.
- 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.
OOP focuses on the objects that developers want to manipulate rather than the logic required to
manipulate them. This approach to programming is well-suited for programs that are large,
complex and actively updated or maintained.
Page 2
splitting the functionalities into a number of procedures. In procedural programming,
a large program is broken down into smaller manageable parts called procedures or
functions. Here, priority is given on functions rather than data. In a procedural
programming language, a program basically consists of a sequence of instructions
each of which tells the computer to do something such as reading inputs from the
user, doing the necessary calculation, displaying output.
- 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.
OOP focuses on the objects that developers want to manipulate rather than the logic required to
manipulate them. This approach to programming is well-suited for programs that are large,
complex and actively updated or maintained.
Page 2

- Event-driven programming is a programming paradigm in which the flow of program
execution is determined by events - for example a user action such as a mouse click, key
press, or a message from the operating system or another program. An event-driven
application is designed to detect events as they occur, and then deal with them using an
appropriate event-handling procedure. The idea is an extension of interrupt-driven
programming of the kind found in early command-line environments such as DOS, and in
Page 3
execution is determined by events - for example a user action such as a mouse click, key
press, or a message from the operating system or another program. An event-driven
application is designed to detect events as they occur, and then deal with them using an
appropriate event-handling procedure. The idea is an extension of interrupt-driven
programming of the kind found in early command-line environments such as DOS, and in
Page 3
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide

embedded systems (where the application is implemented as firmware).
2. Characterristics and relationships
- Procedure:
Characteristics of procedural programming
A large program is broken down into small manageable procedures or functions. This
reduces code duplication, which improves readability and maintainability of the code.
Different functions can share data via global variables. Functions are completely
isolated, therefore if we want to share data, we need to declare it in the upper scope.
Page 4
2. Characterristics and relationships
- Procedure:
Characteristics of procedural programming
A large program is broken down into small manageable procedures or functions. This
reduces code duplication, which improves readability and maintainability of the code.
Different functions can share data via global variables. Functions are completely
isolated, therefore if we want to share data, we need to declare it in the upper scope.
Page 4
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

Functions can change global data. Since global data are transferred from function to
function; during the course of the transformation, the global data may be altered in
function chains.
Top-down methodology. As mentioned before, procedural programming follows the
top-down methodology, workflow is going from top to bottom.
- OOP:
The characteristics of OOP are:
Class definitions – Basic building blocks OOP and a single entity which has data and
operations on data together
Objects – The instances of a class which are used in real functionality – its variables
and operations
Abstraction – Specifying what to do but not how to do ; a flexible feature for having a
overall view of an object’s functionality.
Encapsulation – Binding data and operations of data together in a single unit – A
class adhere this feature
Inheritance and class hierarchy – Reusability and extension of existing classes
Polymorphism – Multiple definitions for a single name - functions with same name
with different functionality; saves time in investing many function names Operator
and Function overloading
Generic classes – Class definitions for unspecified data. They are known as container
classes. They are flexible and reusable.
Class libraries – Built-in language specific classes
Message passing – Objects communicates through invoking methods and sending
data to them. This feature of sending and receiving information among objects
through function parameters is known as Message Passing.
- Event-driven:
Characteristics of event-driven programming
Service Oriented: Service focused is a key features in event-driven programming that
used to create programs that are created for services and it takes does not slow down
Page 5
function; during the course of the transformation, the global data may be altered in
function chains.
Top-down methodology. As mentioned before, procedural programming follows the
top-down methodology, workflow is going from top to bottom.
- OOP:
The characteristics of OOP are:
Class definitions – Basic building blocks OOP and a single entity which has data and
operations on data together
Objects – The instances of a class which are used in real functionality – its variables
and operations
Abstraction – Specifying what to do but not how to do ; a flexible feature for having a
overall view of an object’s functionality.
Encapsulation – Binding data and operations of data together in a single unit – A
class adhere this feature
Inheritance and class hierarchy – Reusability and extension of existing classes
Polymorphism – Multiple definitions for a single name - functions with same name
with different functionality; saves time in investing many function names Operator
and Function overloading
Generic classes – Class definitions for unspecified data. They are known as container
classes. They are flexible and reusable.
Class libraries – Built-in language specific classes
Message passing – Objects communicates through invoking methods and sending
data to them. This feature of sending and receiving information among objects
through function parameters is known as Message Passing.
- Event-driven:
Characteristics of event-driven programming
Service Oriented: Service focused is a key features in event-driven programming that
used to create programs that are created for services and it takes does not slow down
Page 5

the computer as service oriented only take in little of the computer control vitality and
usually services run in the backdrop of OS.
Time Driven: In event motivated programming, time influenced is a paradigm, from
the code that runs on a period trigger, time motivated can be considered a specific
code that works on a specific time, which could be once one hour, once a week or
once a month, this means from the preset to do activity. For example, house windows
revise is the exemplary case of time motivated, which individual can establish when
to revise or when to check and download the revise.
Event Handlers: Event handlers is a type of function or method that run a specific
action when a specific event is prompted. For example, maybe it's a button that
whenever consumer click it, it'll display a note, and it'll close the subject when user
clicks the button again, this is an event handler.
Trigger Functions: Trigger functions in event-driven coding are a function that make
a decision what code to perform whenever there are a specific events occurs, which
are being used to select which event handler to use for the function when you can find
specific event occurred.
Events: Events include mouse, computer keyboard and user interface, which events
have to be triggered in this program in order to happen, that mean user have to
interact with an object in this program, for example, click a button by a mouse, use
computer keyboard to choose a button etc.
Simplicity of Programming and Ease of Development: Event-driven programming is
simple and much easier to program compared to other kind of programming as it's
very aesthetic, for example you can place a button by just select it and place it onto a
form and write a code for this. Event-driven development also easy for user to place a
pre-written code scripts into an existing application because it allows user to pause
Page 6
usually services run in the backdrop of OS.
Time Driven: In event motivated programming, time influenced is a paradigm, from
the code that runs on a period trigger, time motivated can be considered a specific
code that works on a specific time, which could be once one hour, once a week or
once a month, this means from the preset to do activity. For example, house windows
revise is the exemplary case of time motivated, which individual can establish when
to revise or when to check and download the revise.
Event Handlers: Event handlers is a type of function or method that run a specific
action when a specific event is prompted. For example, maybe it's a button that
whenever consumer click it, it'll display a note, and it'll close the subject when user
clicks the button again, this is an event handler.
Trigger Functions: Trigger functions in event-driven coding are a function that make
a decision what code to perform whenever there are a specific events occurs, which
are being used to select which event handler to use for the function when you can find
specific event occurred.
Events: Events include mouse, computer keyboard and user interface, which events
have to be triggered in this program in order to happen, that mean user have to
interact with an object in this program, for example, click a button by a mouse, use
computer keyboard to choose a button etc.
Simplicity of Programming and Ease of Development: Event-driven programming is
simple and much easier to program compared to other kind of programming as it's
very aesthetic, for example you can place a button by just select it and place it onto a
form and write a code for this. Event-driven development also easy for user to place a
pre-written code scripts into an existing application because it allows user to pause
Page 6
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide

the code while it's running. Which make expanding using event-driven programming
is easy.
Compare Event Influenced Development with Object-oriented Development (OOP):
As mentioned above, event-driven coding known as a computer programming
paradigm that used the occurrence of events to look for the control stream of this
program, while objects-oriented encoding (OOP) snacks data fields as items
manipulated through predefined methods only and it created over four major rules,
that happen to be Encapsulation, Data Abstraction, Polymorphism and Inheritance.
3. Relationships between thems
Procedural programming means that you define a program and its subprograms as a
series of steps. In contrast, declarative programs try to describe the result without
regard to the steps taken to computer it but rather some description or denotation of
the desired result.
Object oriented programming is a way of organizing code around the principles of
encapsulation, inheritance, substitution, programming to interfaces, and so on.
Object-oriented programs are usually mostly procedural.
Event based programming is about writing event handling procedures and having the
core event loop provided by the underlying system. In this way you can save the
trouble of writing your own event loop and benefit from various libraries that already
work with the system provided event loop. Event based programs are very often
writing using object-oriented style, but not always.
These three categories are thus not related strictly hierarchically, but in common
usage they are mostly nested within one another to make the program better.
4. About using programming paradigms in my program: In your program, you
uesd what paradigm? Explanation about them
In my program, I used Event-driven paradigm. I can design the interface easily, just
as I want and make sure the user follows the right functionality. Moreover, it is also
easier to write code, test and debug.
Page 7
is easy.
Compare Event Influenced Development with Object-oriented Development (OOP):
As mentioned above, event-driven coding known as a computer programming
paradigm that used the occurrence of events to look for the control stream of this
program, while objects-oriented encoding (OOP) snacks data fields as items
manipulated through predefined methods only and it created over four major rules,
that happen to be Encapsulation, Data Abstraction, Polymorphism and Inheritance.
3. Relationships between thems
Procedural programming means that you define a program and its subprograms as a
series of steps. In contrast, declarative programs try to describe the result without
regard to the steps taken to computer it but rather some description or denotation of
the desired result.
Object oriented programming is a way of organizing code around the principles of
encapsulation, inheritance, substitution, programming to interfaces, and so on.
Object-oriented programs are usually mostly procedural.
Event based programming is about writing event handling procedures and having the
core event loop provided by the underlying system. In this way you can save the
trouble of writing your own event loop and benefit from various libraries that already
work with the system provided event loop. Event based programs are very often
writing using object-oriented style, but not always.
These three categories are thus not related strictly hierarchically, but in common
usage they are mostly nested within one another to make the program better.
4. About using programming paradigms in my program: In your program, you
uesd what paradigm? Explanation about them
In my program, I used Event-driven paradigm. I can design the interface easily, just
as I want and make sure the user follows the right functionality. Moreover, it is also
easier to write code, test and debug.
Page 7
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

III. LO3 Implement basic algorithms in code using an IDE
A. Write a program that implements an algorithm using an IDE (P3).
1. Intro
This is an information student management program built with the Event-Driven
paradigm. It helps users easily manipulate the interface.
2. Screenshots of the programs (User interfaces)
First, when the user opens the program. The form will appear and the user will enter the
information requested by the form
After entering all the necessary information. Click "Submit", there will be a message
showing all the requests entered as: Student ID, Student Name, Gender, Country,
Address, Languages
Click "Close" on the window. The user will return to the interface as they were when
entering information
If the user has finished entering the information, they want to delete all the information
entered. The user will click "Cancel" and all the information entered will disappear and
the program will reappear when started.
After using, users click "click" to exit the program.
3. Code explanations
- Submit:
Page 8
A. Write a program that implements an algorithm using an IDE (P3).
1. Intro
This is an information student management program built with the Event-Driven
paradigm. It helps users easily manipulate the interface.
2. Screenshots of the programs (User interfaces)
First, when the user opens the program. The form will appear and the user will enter the
information requested by the form
After entering all the necessary information. Click "Submit", there will be a message
showing all the requests entered as: Student ID, Student Name, Gender, Country,
Address, Languages
Click "Close" on the window. The user will return to the interface as they were when
entering information
If the user has finished entering the information, they want to delete all the information
entered. The user will click "Cancel" and all the information entered will disappear and
the program will reappear when started.
After using, users click "click" to exit the program.
3. Code explanations
- Submit:
Page 8

- Show info:
Page 9
Page 9
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide

- Cancel:
- Quit:
IV. LO4 Determine the debugging process and explain the importance of a coding
standard
A. Explain the debugging process and explain the debugging facilities available in the
IDE. (P4)
1. Debugging is one of most important process in programming what help coder find
out problem in coding process. By find out the issues, coder can be fix and make
code
2. Debugging is the process: (explanations)
Debugging is the process of detecting and removing of existing and potential errors (also
called as ‘bugs’) in a software code that can cause it to behave unexpectedly or crash. To
prevent incorrect operation of a software or system, debugging is used to find and resolve
bugs or defects. When various subsystems or modules are tightly coupled, debugging
Page 10
- Quit:
IV. LO4 Determine the debugging process and explain the importance of a coding
standard
A. Explain the debugging process and explain the debugging facilities available in the
IDE. (P4)
1. Debugging is one of most important process in programming what help coder find
out problem in coding process. By find out the issues, coder can be fix and make
code
2. Debugging is the process: (explanations)
Debugging is the process of detecting and removing of existing and potential errors (also
called as ‘bugs’) in a software code that can cause it to behave unexpectedly or crash. To
prevent incorrect operation of a software or system, debugging is used to find and resolve
bugs or defects. When various subsystems or modules are tightly coupled, debugging
Page 10
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

becomes harder as any change in one module may cause more bugs to appear in another.
Sometimes it takes more time to debug a program than to code it.
3. The debugging process in the IDE used and how it helped with development.
(Syntax error, Logical error…)
- Syntax Error: A syntax error is an error in the source code of a program. Since computer
programs must follow strict syntax to compile correctly, any aspects of the code that do
not conform to the syntax of the programming language will produce a syntax error.
- Logic Error: A logic error (or logical error) is a mistake in a program's source code that
results in incorrect or unexpected behavior. It is a type of runtime error that may simply
produce the wrong output or may cause a program to crash while running.
- Semantic Errors: Semantic errors are improper uses of “program statements”. Though
different definitions of semantic error exist, we are saying here that logic errors produce
wrong data. While semantic errors produce nothing meaningful at all. These errors have
to do with meaning or context. It is like using the wrong word in the wrong place in a
human language sentence. A computer language example would be confusing a metric
with an imperial input value.
- Run-time Errors: Run-time errors are the errors that occur during the execution of the
program. Some examples are, dividing by zero error, insufficient memory for dynamic
memory allocation, referencing an out-of-range array element. A program with these
kinds of errors will run but produce erroneous results or may cause termination of
program. Detection and removal of a run-time error is a difficult task.
4. How to use the Debugging Tool in Visual Studio
- Debug
To debug, you need to start your app with the debugger attached to the app process. F5
(Debug > Start Debugging) is the most common way to do that. If you have a file open in
Page 11
Sometimes it takes more time to debug a program than to code it.
3. The debugging process in the IDE used and how it helped with development.
(Syntax error, Logical error…)
- Syntax Error: A syntax error is an error in the source code of a program. Since computer
programs must follow strict syntax to compile correctly, any aspects of the code that do
not conform to the syntax of the programming language will produce a syntax error.
- Logic Error: A logic error (or logical error) is a mistake in a program's source code that
results in incorrect or unexpected behavior. It is a type of runtime error that may simply
produce the wrong output or may cause a program to crash while running.
- Semantic Errors: Semantic errors are improper uses of “program statements”. Though
different definitions of semantic error exist, we are saying here that logic errors produce
wrong data. While semantic errors produce nothing meaningful at all. These errors have
to do with meaning or context. It is like using the wrong word in the wrong place in a
human language sentence. A computer language example would be confusing a metric
with an imperial input value.
- Run-time Errors: Run-time errors are the errors that occur during the execution of the
program. Some examples are, dividing by zero error, insufficient memory for dynamic
memory allocation, referencing an out-of-range array element. A program with these
kinds of errors will run but produce erroneous results or may cause termination of
program. Detection and removal of a run-time error is a difficult task.
4. How to use the Debugging Tool in Visual Studio
- Debug
To debug, you need to start your app with the debugger attached to the app process. F5
(Debug > Start Debugging) is the most common way to do that. If you have a file open in
Page 11

the code editor, you can set a breakpoint by clicking in the margin to the left of a line of
code.
- Step over code to skip functions
When you are on a line of code that is a function or method call, you can press F10 (Debug >
Step Over) instead of F11.
F10 advances the debugger without stepping into functions or methods in your app code (the
code still executes). By pressing F10, you can skip over code that you're not interested in. This
way, you can quickly get to code that you are more interested in.
Page 12
code.
- Step over code to skip functions
When you are on a line of code that is a function or method call, you can press F10 (Debug >
Step Over) instead of F11.
F10 advances the debugger without stepping into functions or methods in your app code (the
code still executes). By pressing F10, you can skip over code that you're not interested in. This
way, you can quickly get to code that you are more interested in.
Page 12
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide
1 out of 18