Uploaded by pahanb888

Programming Assignment - Reworded 2021

advertisement
Higher Nationals
Internal verification of assessment decisions – BTEC (RQF)
INTERNAL VERIFICATION – ASSESSMENT DECISIONS
Higher National Diploma in Computing
Programme title
Assessor
Internal Verifier
Unit(s)
Assignment title
Student’s name
List which assessment criteria Pass
the Assessor has awarded.
Merit
Distinction
INTERNAL VERIFIER CHECKLIST
Do the assessment criteria awarded match
those shown in the assignment brief?
Is the Pass/Merit/Distinction grade awarded
justified by the assessor’s comments on the
student work?
Has the work
accurately?
been
assessed
assessment
decision
Y/N
Y/N
Is the feedback to the student:
Give details:
• Constructive?
• Linked to relevant assessment criteria?
• Identifying
opportunities
for
improved performance?
• Agreeing actions?
Does the
amending?
Y/N
Y/N
Y/N
Y/N
Y/N
need
Y/N
Assessor signature
Date
Internal Verifier signature
Date
Programme Leader signature (if required)
Date
COL00126947
1
Confirm action completed
Remedial action taken
Give details:
Assessor signature
Date
Internal Verifier
signature
Date
Programme
Leader
signature (if required)
Date
COL00126947
2
Higher Nationals - Summative Assignment Feedback Form
Student Name/ID
Unit Title
Assignment Number
Assessor
Submission Date
Date Received 1st
submission
Re-submission Date
Date
Received
submission
2nd
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
Integrated Development Environment (IDE).
Pass, Merit & Distinction Descripts
P2
M2
D2
M3
D3
LO3. Implement basic algorithms in code using an IDE.
Pass, Merit & Distinction Descripts
P3
LO4. Determine the debugging process and explain the importance of a coding standard.
Pass, Merit & Distinction Descripts
Grade:
P4
P5
M4
Assessor Signature:
Date:
Assessor Signature:
Date:
D4
Resubmission Feedback:
Grade:
Internal Verifier’s Comments:
Signature & Date:
COL00126947
3
* 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
Feedback: Student to Assessor
Assessor
signature
Date
Student
signature
Date
COL00126947
4
Pearson Higher Nationals in
Computing
Unit 01: Programming
Assignment 01
COL00126947
5
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.
2.
3.
4.
The font size should be 12 point, and should be in the style of Time New Roman.
Use 1.5 line spacing. Left justify all paragraphs.
Ensure that all the headings are consistent in terms of the font size and font style.
Use footer function in the word processor to insert Your Name, Subject, Assignment No,
and Page Number on each page. This is useful if individual sheets become detached for any
reason.
5. Use word processing application spell check and grammar check function to help editing
your assignment.
Important Points:
1. It is strictly prohibited to use textboxes to add texts in the assignments, except for the
compulsory information. eg: Figures, tables of comparison etc. Adding text boxes in the body
except for the before mentioned compulsory information will result in rejection of your
work.
2. Carefully check the hand in date and the instructions given in the assignment. Late
submissions will not be accepted.
3. Ensure that you give yourself enough time to complete the assignment by the due date.
4. Excuses of any nature will not be accepted for failure to hand in the work on time.
5. You must take responsibility for managing your own time effectively.
COL00126947
6
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
Student Declaration
I hereby, declare that I know what plagiarism entails, namely to use another’s work and to present
it as my own without attributing the sources in the correct way. I further understand what it means
to copy another’s work.
1. I know that plagiarism is a punishable offence because it constitutes theft.
2. I understand the plagiarism and copying policy of the Edexcel UK.
3. I know what the consequences will be if I plagiaries or copy another’s work in any of the
assignments for this program.
4. I declare therefore that all work presented by me for every aspects of my program, will be
my own, and where I have made use of another’s work, I will attribute the source in the
correct way.
5. I acknowledge that the attachment of this document signed or not, constitutes a binding
agreement between myself and Edexcel UK.
6. I understand that my assignment will not be considered as submitted if this document is not
attached to the attached.
Student’s Signature:
(Provide E-mail ID)
Date:
(Provide Submission Date)
COL00126947
7
COL00126947
8
Higher National Diploma in Computing
Assignment Brief
Student Name /ID Number
Unit Number and Title
Unit 01: Programming
Academic Year
2021/22
Unit Tutor
Assignment Title
Design &Implement a GUI based system using a suitable
Integrated Development Environment
Issue Date
Submission Date
IV Name & Date
Submission Format
This submission will have 3 components
1. Written Report
This submission is in the form of an individual written report. This should be written in a concise, formal
business style using single spacing and font size 12. You are required to make use of headings, paragraphs
and subsections as appropriate, and all work must be supported with research and referenced using the
Harvard referencing system. Please also provide a bibliography using the Harvard referencing system. (The
recommended word count is 1,500–2,000 words for the report excluding annexures)
2. Implemented System (Software)
The student should submit a GUI based system developed using an IDE. The system should connect with a
backend database and should have at least 5 different forms and suitable functionality including insert,
edit and delete of main entities and transaction processing.
3. Presentation
With the submitted system student should do a presentation to demonstrate the system that was
developed. Time allocated is 10 to 15 min. Student may use 5 to 10 PowerPoint slides while doing the
presentation, but live demonstration of the system is required. Evaluator will also check the ability to
modify and debug the system using the IDE.
COL00126947
9
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
COL00126947
1
0
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
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
COL00126947
1
1
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.
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 arealso 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.
COL00126947
1
2
Return the total rent_value when vehicle_no, rented_date, return_date, with_driver
parameters are sent in. with_driver parameter is set to true or false depending whether the
vehicle is rented with or without driver.
Function 2: Day tour - hire calculation.
Calculate total hire_value when vehicle_no, package_type, start_time, end_time,
start_km_reading, end_km_reading parameters are sent in. Should return base_hire_charge,
waiting_charge and extra_km_charge as output parameters.
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.
4.2 Explain debugging process and the features available in Visual studio IDE for debugging
COL00126947
1
3
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.
COL00126947
1
4
COL00126947
1
5
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.
D1 Evaluate the implementation of an algorithm in a suitable
language. Evaluate the relationship between the written
algorithm and the code variant
COL00126947
1
6
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
code structure and characteristics.
COL00126947
1
7
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.
LO4 Determine the debugging process and explain
the importance of a coding standard
COL00126947
1
8
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.
COL00126947
1
9
PROGRAMMING
28/08/2022
COL/HND-COM-GEN/2122-MAR/119
Sanduni Malsha
COL00126947
COL00126947
2
0
Table of Contents
Acknowledgement ................................................................................................................... 20
Activity 1 .................................................................................................................................. 21
Activity 2 .................................................................................................................................. 29
Activity 3 .................................................................................................................................. 34
Activity 4 .................................................................................................................................. 36
COL00126947
2
1
Acknowledgement
In order to complete my work, I needed the assistance and instruction of various renowned
individuals who deserve my Higher National Diploma. I'd want to extend my diploma to all
those who have personally assisted me in completing this task.
Furthermore, I'd want to thank my batch brothers and friends for their assistance in
completing this work in a timely and effective manner. Many individuals, particularly my
classmate, offered excellent remark ideas on my work, which inspired me to increase the
quality of the task.
The success and ultimate completion of this project took a great deal of direction and
support from many individuals, and I am grateful.
COL00126947
2
2
Activity 1
What is an algorithm?
An algorithm is a methodical approach for solving mathematics and computing issues, such
as sorting data. It's not yet a computer program. It's simply a description of how you want
the computer to carry out a task.
Consider an algorithm to be similar to an outline that a writer creates before writing a piece.
Similarly, before building a program, a developer might think out how to tackle an issue.
Algorithms are sets of instructions in computing that decide the "what" but also handle the
"how." Using algorithms allows programmers to obtain a deeper grasp of the processes that
will help them solve challenges. Characteristics of a good algorithm.
COL00126947
2
3
The characteristics
algorithm are:
of
a
good
Input: An algorithm requires some input values. An algorithm should have 0 or more welldefined inputs.
Output: At the end of an algorithm, you will have one or more well-defined outputs, and
should match the desired output.
Unambiguous: A perfect algorithm is defined as unambiguous, which means that each of its
step should be clear and straightforward.
Finiteness: An algorithm must be finite. The instructions should be countable.
Independence: An algorithm must be independent, which means that its instructions can be
implemented in any programming code and produce the same results.
Start
Pseudocode
Start
Declare a, b, c, n, i
Initialize a=0, b=1, i=2
input n
print a and b
WHILE i<=n
c= a+b
print c
a=b , b=c , i=i+1
End
Initialize a=0, b=1,
i=2
Input n
Print a and b
i =2
COL00126947
While
i <=n
Yes
c = a+b
Print c
No
End
2
4
Declare a, b, c, n, i
Python
a=0
b=1
i=2
n=int(input('Enter value for n :
'))
while i<=n+1:
c=a+b
print ('fibonachi #',i-1,' is: ',c)
a=b
b=c
i=i+1
Pseudocode
Start
Read n
Initialize i=1 , fact =1
IF i<=n
fact = fact * i
COL00126947
2
5
i = i +1
Print x
END
Python
i=1
fact=1
n=int(input('enter number(n): '))
while(i<=n):
fact=fact*i
i=i+1
print(n,"! is",fact,'\n')
Dry run for Fibonacci Numbers
Fn = F n-1 + F n-2
n=5
COL00126947
2
6
Pseudocode
Start
Declare a, b, c, n, i
Initialize a=0, b=1, i=2
input 5
print 0 and 1
WHILE i<=5
c= 0+1
print 1
a=1 , b=1 , i=2+1
End
Trace Table
Input (n)
5
5
5
5
5
a
0
1
1
2
3
b
1
1
2
3
5
i
2
3
4
5
6
Output (c)
1
2
3
5
COL00126947
2
7
Dry run for Factorial Numbers
n! = n * (n - 1) * …….. 1
n=5
Pseudocode
Start
Read 5
Initialize i=1 , fact =1
IF i<=5
fact = 1 * 1
i = i +1
Print x
END
Trace Table
Input (n)
5
5
5
5
5
fact
1
1
2
6
24
i
1
2
3
4
5
Output (c)
120
COL00126947
2
8
Dry run for Fibonacci Numbers
Fn = F n-1 + F n-2
n=5
Pseudocode
Start
Declare a, b, c, n, i
Initialize a=0, b=1, i=2
input 5
print 0 and 1
WHILE i<=5
c= 0+1
print 1
a=1 , b=1 , i=2+1
End
Trace Table
Input (n)
5
5
5
5
5
a
0
1
1
2
3
b
1
1
2
3
5
i
2
3
4
5
6
Output (c)
1
2
3
5
Dry run for Factorial Numbers
n! = n * (n - 1) * …….. 1
n=5
Pseudocode
Start
Read 5
Initialize i=1 , fact =1
IF i<=5
fact = 1 * 1
COL00126947
2
9
i = i +1
Print x END
Trace Table
Input (n)
5
5
5
5
5
fact
1
1
2
6
24
i
1
2
3
4
5
Output (c)
120
BIG O NOTATION
From a programming concept, Big O notation is used as a sort of measurement unit that
helps programmers evaluate or estimate the efficiency of a written bloc of code, a script or an
algorithm: “What the amount of time it’s going to take to run? What is
the complexity depending on the variation of data to be processed by that piece of code”.
Reference
Yann Mulonda (2019) Algorithm’s Efficiency | Big O “In Simple English”.[blog entry]17
July. Bits and Pieces.Available from https://blog.bitsrc.io/algorithms-efficiency-big-o-insimple-english-adbaedbcdfcf [Accessed 22 August 2022].
COL00126947
3
0
Pseudo code for Fibonacci series:
start
Fn=1
F(n-1)=0
For (i=0;i<n;i++)
F(n+1)= F(n-1)+F(n)
print(F(n+1))
end
Pseudo code for Factorial:
start
scan value n
for (i=0;i<n;i++)
fact=n*n(n-1)
print fact
end
As here we are using only one for loop in both the loop, so here the complexity of the
algorithm be O(N).
COL00126947
3
1
Activity 2
Programming Paradigm
What is Programming Paradigm
Object Oriented Program
Object Oriented Programming is based on conveying messages to things. Objects respond to
messages by conducting artistic operations known as ways. Messages may contain
arguments. A society of objects, each with their own native memory and set of operations,
has a fundamentally different feel from non-object-oriented languages' monolithic CPU and
one common memory. One of the most noticeable elements of Object Oriented languages is
that conditionals and loops become messages in and of themselves, with arguments that are
frequently blocks of executable code. In a syntax similar to Smalltalk.
Event Driven Programming
Event-driven programming is a programming paradigm in which the flow of program
execution is determined by events, such as a user action like as a depression or key push, or a
message from the operating system or another program. An event-driven application is
designed to detect events as they occur and then process them using an appropriate eventhandling strategy. The concept is an outgrowth of interrupt-driven programming, which was
popular in early command-line environments like DOS and in embedded systems (where the
application is implemented as firmware).
Relationship between Object Oriented Programming and Event Driven
COL00126947
3
2
Object oriented and event driven
programming are both important programming approaches utilized in
today's software development. In the process of learning how to program in various
programming languages, you must be able to grasp the contrast between object oriented and
event driven programming strategies. Object destined programming is a programming
language model that is based around objects rather than actions (as in event driven
programming) and information rather than logic.
On the other side, event driven programming is a programming paradigm in which the flow
of the program is determined by events such as user actions (mouse clicks, key presses),
sensor outputs, or messages from other programs or threads. Programming languages are
classified using procedural, event-driven, and object-oriented paradigms. A procedural
programming paradigm is portrayed as a set of stages in which a computer programmer
writes code to execute a given task. The first line of code is run first, followed by the second,
third, and so on until the last line of code is executed. As a result, procedural programming is
a top-down technique to executing lines of code. BASIC, COBOL, PASCAL, and
FORTRAN are the most prominent procedural paradigm languages.
While the procedural paradigm employs steps, the event-driven paradigm use user-generated
events to run functions on data. These events might be as basic as a mouse click or a
sequence of key strokes from the user (as in GUI-based programs), or they could be messages
from other programs. When an event is identified, programming languages continually listen
or sense for it, and then run the appropriate function. Because the majority of GUI
applications rely on user actions, these GUI programming languages will include eventdriven paradigm based programming as an essential component.
Event-driven programming is distinguished by the fact that it is service-oriented, employs
event handlers and triggers, has user interfaces, and is time-driven. Visual C++, Java, and
Visual Basic are the most common languages for GUI or visual applications that leverage the
event-driven paradigm.
The object-oriented paradigm differs from both the procedural step-based paradigm and the
event-driven trigger/event-based paradigm in that the object-oriented paradigm is built on
objects and classes and their re-use to accomplish a specified code-function. In contrast to the
COL00126947
3
3
procedural paradigm, the object-oriented
paradigm employs a bottom-up approach.
These objects, in their most basic form, contain data in the form of
fields. Programs are subdivided into smaller components called objects that belong to a class.
These items communicate with one another using functions. C++, Java, Objective C, and
Python are the most popular object-oriented languages. Objects, classes, encapsulation,
inheritance, data abstraction, dynamic binding, message passing, and polymorphism are
properties of object-oriented languages.
Structure and The Unique Characteristics
In contrast to object-oriented programming, which focuses on data and models, procedural
programming focuses on action sequences. Knowledge is the reason for the existence of a
program, according to the goal of programming. In procedural languages like C, programs are
made up of procedures or functions, and each procedure is a series of statements that serve a
specified purpose.
The Characteristics of Procedural Programming
Concentrate on the process of doing things rather than the data. The entire software is built on
actions like reading, calculating, and printing. As a result, a slew of functions is built to solve
a program from top to bottom. All functions often exchange global data. Data flows freely
from one function to the next.
The Disadvantages of Procedural Programming
Bad code trick. Functions in PP, unlike categories and objects, are task driven and cannot be
reused after they have met a unique one. Aside from several regularly used library methods,
we must create a lot of repetitious code for comparable issues.
The Advantages of Procedural Programming
COL00126947
3
4
No need to think about recycling code for
subsequent usage; just think about how to do
this task. Compiler and interpreter installation is made simple. It is
simple to keep track of workflow.
Less memory is required. Because there is no information abstraction, the code size is
excessive, using variable RAM. A very typical programming style that will aid in the learning
of OOP later on.
Object-Oriented Programming (OOP) is a programming paradigm that models various
components of a computer program after real-world objects. An object is anything that has
certain properties and can perform a function. Consider the following scenario: you must
create a Formula 1 automobile racing game using object-oriented programming. The first
step is to recognize real-world things in the actual Formula 1 race. What are the entities in a
Formula One race that have certain features and can perform any function? The vehicle is one
of the obvious solutions to this issue. A car will include features such as engine capacity,
brand, model, and manufacturer, among others. An automobile, too, can be started, stopped,
accelerated, and so on. In a Formula 1 race, a driver might be another object. A driver has a
nationality, age, gender, and other characteristics, and he may execute functions such as
driving the automobile, moving the steering wheel, or changing the gearbox.
In object-oriented programming, we will build objects for the matching real-world entity, just
as we did in this example. It is critical to note that object-oriented programming is not a
language-specific notion. It is a general programming idea, and most current programming
languages, including Java, C#, C++, and Python, support it. We shall have a full introduction
to Object-Oriented Programming in Python in this post, but first we will look at some of the
benefits and drawbacks of object-oriented programming. Event-driven programming is a
programming paradigm that uses the occurrence of events to determine the program's
management flow.
This sort of program is designed to detect events as they occur and to affect them using an
approved event-handling strategy, which often employs a callback function or method.
Theoretically, event-driven programming is available in all programming languages, but
COL00126947
3
5
implementation varies; for example, it is
easier to implement in languages that enable
high-level abstractions, such as closures. Furthermore, they are
particularly designed for triggering program code by events in different programming
environments such as Adobe Flash. In general, an event-driven program has a main loop that
listens for events and initiates a recall operation when one is detected.
Event driven programming's key features and characteristics Service Oriented Serviceoriented programming is a key option in event-driven programming because it eliminates the
need to write programs that are designed for services and it doesn't slow down the computer
because service-oriented programming consumes very little of the computer's processing
power and typically runs in the background of the operating system.
Event Handlers
Event handlers are a type of operation or mechanism that performs a certain action when an
event occurs. For example, it may be a button that, when clicked, displays a message and,
when clicked again, closes the message; this is an event handler.
Trigger Functions
In event-driven programming, trigger functions are functions that decide what code to
execute when a given event happens, and they are used to pick which event handler to utilize
for the event after a specific event occurs.
Events
Events are represented by the mouse, keyboard, and programmer, and these events must be
triggered in the program in order to occur, which means that the user must interact with an
COL00126947
3
6
object in the program, such as clicking a
button with a mouse, selecting a button with
the keyboard, and so on.
Simplicity of Programming and Ease of Development
Because it's quite visible, event-driven programming is simple and easier to program than
other types of programming. For example, you'll be able to create a button by just selecting it,
placing it on a form, and writing code for it. Event driven programming also makes it simple
for users to incorporate pre-written code scripts into existing applications since it allows users
to pause the code while it's running. As a result, working using event-driven programming is
simple.
Compare Event Driven Programming with Object-oriented Programming
As previously stated, event-driven programming is a computer programming paradigm that
uses the occurrence of events to determine the control flow of the program, whereas objectsoriented programming (OOP) treats data fields as objects that can only be manipulated using
pre-defined methods and is built on four major principles: encapsulation, data abstraction,
polymorphism, and inheritance. Event-driven programming examples include JavaScript,
ActionScript, Visual Basic, and Elm, whereas object-oriented programming examples include
C++, C#, Java, Python, Ruby, and Scala.
In event-driven programming, a program is performed when an event is recognized, such as
using a mouse to click a button to display a message. Furthermore, in object-oriented
programming, focus is placed on data, and classes are the major component of OOP, which
means that classes are the blueprints of the object and keep the data secure within the
categories, with only methods of certain classes being permitted to see the data.
The categories also are very different between event-driven programming and object
homeward-bound programming. In OOP, categories may be created by own whereas in
event-driven programming user should use the outlined categories. Object-oriented
programming and event-driven programming may use together, which mentioned above that
event-driven programming are support in all programming language, it’s just the way of
implement it may different.
COL00126947
3
7
Activity 3
Ayubo Leisure Welcome Form
COL00126947
3
8
COL00126947
3
9
Activity 4
Integrated Development Environment(IDE)
An integrated development environment is a software package application that provides
extensive software package development features to computer programmers. An IDE often
includes a source code editor, build automation tools, and a computer application. Some
IDEs, like NetBeans and Eclipse, include a compiler, interpreter, or both; others, like Sharp
Develop and Lazarus, do not. The line between an IDE and the rest of the software
development environment is not always clear; occasionally a version control system or
numerous tools to aid in the creation of a graphical user interface (GUI) are combined.
Many modern days even feature a category browser, associate object browser, and a
category hierarchy diagram to aid in the creation of object-oriented software packages.
Benefits Of Visual Studio IDE
COL00126947
4
0
ting platforms
.
Syntax Highlighting
The Integrated Development Environment (IDE) editor typically provides syntax highlight, it
will show each the structures, the language keywords and also the syntax errors with visually
distinct colors and font effects.
Code Completion
Code completion is an important IDE feature, meant to speed up programming, and modern
IDEs even have intelligent code completion.
Refactoring
Advanced IDEs provide support for automated refactoring.
Version control
An IDE is expected to provide integrated version control, in order to interact with source
repositories.
Debugging
IDEs are also used for debugging, using an integrated debugger, with support for setting
breakpoints in the editor, visual rendering of steps, etc.
Code search
IDEs may provide advanced support for code search: in order to find class and function
declarations, usages, variable and field read/write, etc. IDEs can use different kinds of user
interface for code search, for example form-based widgets and natural-language based
interfaces.
COL00126947
4
1
What is Debugging an Application
Developing package programs endure
significant testing, updating, troubleshooting and maintenance. Normally, package contains
errors and bugs, that area unit habitually removed. In the debugging method, complete
package programs area unit often compiled and dead to spot and rectify problems. Large
package programs, that contain several source code lines, area unit divided into little
elements. For potency, every part is debugged one by one initially, followed by the program
as an entire. This system is easy to reach and helps the students to achieve easy education
during this period.I give thanks to those who have helped me to achieve this easy education.
This easy way can be used to make a good position in education
COL00126947
4
2
Download