100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Essay

BTEC LEVEL 3 - UNIT 14 - EVENT DRIVEN PROGRAMMING

Rating
4.2
(19)
Sold
39
Pages
42
Uploaded on
15-08-2017
Written in
2015/2016

BTEC LEVEL 3 EVENT DRIVEN PROGRAMMING ASSIGNMENT COMPLETED BY STUDENT: P1,P2,P3,P4,P5,P6,M1,M2,M3,D1,D2 main program is about a phone bill program











Whoops! We can’t load your doc right now. Try again or contact support.

Document information

Uploaded on
August 15, 2017
File latest updated on
April 18, 2018
Number of pages
42
Written in
2015/2016
Type
Essay
Professor(s)
Unknown
Grade
Unknown

Subjects

Content preview

UNIT 14
P1 - Explain THE KEY FEATURES OF EVENT DRIVEN PROGRAMMING

Time driven

 Time driven programming is a method of computer programming which is commonly used in
real-time computing. Where code execution is managed by the clock on the computer. A
program is split into specifc targets which requires to be activated regularly. The patern is
saved in a table which is dispatch able in which rules are applied to running the tasks on a
schedule.

Service orientated

 Many networking sofware applications use techniques which are service-oriented so they are
able to be diferent applications are able to reuse code components. Departments in a business
can create and release services using diferent types of programming languages. In which other
sofware applications are able to gain an advantage from this service

Event handlers

 Common programs have controls on them. Controls are objects on a form for example a list
box. A lot of event driven programming environments such as VB.NET have toolbox’s showing
objects which can be input to forms. Many objects have many possible events which could be
right click.

Trigger functonn

 Events driven programming language have trigger functions to choose which event handler to
execute according to which event occurred. Every object has a range of trigger functions. All
objects have a range of trigger functions one for each event which can occur to the object.
When this control is created the programmer has to identify trigger functions otherwise no
properties or methods will be created for the control.

Events e.g. mouse events keyboard events form events

 There are many events which can occur that can cause event handlers to trigger. For example a
mouse event can consist of: lef clicking double lef clicking right click and hovering. While as
keyboard can consist of: key press key down and key up. HTML object consists of clicking an
object. Form events consists of events which load and show for the frst period of time and
trigger event used when the form gains focus. Form events are able to trigger event handlers for
objects on a form such as an accept buton code for user uses the enter key buton on the form.

Event loops

,  Event driven programming languages have event loops implemented within them at a standard
the programmer would not notice. The event loops are required to test user interface to identify
if anything has occurred. For example typing leters from the keyboard to a textbox.

 When an event is detected the event will proceed to trigger functions which will look for the
appropriate event handler to run code in the program which is writen for that event.

 Event driven programming languages usually have provision for programmers to develop event
listeners to improve the functions of the program and even more fexible. This is because it
would not be possible for designers of programming languages to provide events for every
possible circumstance.

Suitability for graphical interfaces

 Event driven programs are reasonable for graphical user interfaces (GUIs) A GUI shows the user
many graphical choices and menus which can be used with input devices such as a keyboard.

 An event driven programming language will use a GUI approach to allow users choice of variety
of controls. Every control has a specifc reaction to events with cost which is appropriate for
each event and the tasks of the program.

 Many controls rely

Simplicity of programming

 Event driven programming languages are able to make programming simple in comparison to
traditional fow driven languages. Due to the programming language being very visual.

 A control for example a buton can easily be put on a form from the toolbox. When it appears
on the form the programmer is able to see it. The programmer can choose to see properties of
control when coding the program.

Ease of development

 Program development is simple with an event driven language because the programmer
requires work on one event of an event of one control at a time.

 Flow driven languages requires to be completed before it can be run and tested whiles an event
driven language is able to run with as litle as only the code for each event completed.

 Testing is easy because each event is testes in turn.

, P2- Demonntrate the une of event driven tooln and
techniquen
Program 1 code
Public Class Form1
Dim WithEvents aTimer As New System.Windows.Forms.Timer

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button1.Click
Dim num1 As Short 'maximum 32767, minimum –32768
Dim num2 As Integer 'maximum 2,147,483,647 minimum -2,147,483,648
Dim num3 As Single 'maximum 3.4028235E+38 , minimum -1.401298E-45
Dim num4 As Double ' -1.79769313486231570E+308 to -4.94065645841246544E-324 for
negative, 4.94065645841246544E-324 through 1.79769313486231570E+308 for positive
Dim total As Integer
Dim average As Double

num1 = 32000
num2 = 2147000000
num3 = 2.77777777
num4 = 5.5555555555555554

total = num1 + num2 + num3
average = total / 4

MessageBox.Show(average) 'When the button1 is clicked the program will perform
calculations from step by step instructions as set: adding num1, num2, num3, num4 and then
diving them by 4.
' Therefore this would be sequence programming.


End Sub

Private Sub aTimer_Tick(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles aTimer.Tick
Timer.Text = DateTime.Now.ToString("MMMM dd, yyyy h:mm:ss tt")
End Sub

Private Sub Form1_Shown(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles Me.Shown
aTimer.Interval = 200
aTimer.Start()
End Sub
End Class

Reviews from verified buyers

Showing 7 of 19 reviews
4 year ago

good!

6 year ago

6 year ago

6 year ago

Good Basic Introduction, examples are useful and well commented

6 year ago

Thanks for your review. How can it be improved?

6 year ago

6 year ago

Thanks for your review how can it be improved?

6 year ago

6 year ago

Thanks for the review.

7 year ago

7 year ago

Thanks for your review. How can it be improved?

4.2

19 reviews

5
8
4
7
3
3
2
1
1
0
Trustworthy reviews on Stuvia

All reviews are made by real Stuvia users after verified purchases.

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
xeon Brunel University
View profile
Follow You need to be logged in order to follow users or courses
Sold
1164
Member since
8 year
Number of followers
850
Documents
32
Last sold
5 months ago
BTEC ICT LEVEL 3 Previous Asssignments From QCF 2010

The best seller for BTEC ICT LEVEL 3 Extended Diploma in IT. Got D*D*D* in BTEC ICT LEVEL 3 Extended Diploma in IT (Which is the highest possible grade) Just finished studying computer science at Brunel University. PLEASE DO NOT BUY MY OLD COURSEWORK THINKING YOU WILL FIND ANSWERS TO YOUR ASSIGNMENT IN MY OLD COURSEWORK.

3.7

320 reviews

5
137
4
71
3
44
2
30
1
38

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their exams and reviewed by others who've used these revision notes.

Didn't get what you expected? Choose another document

No problem! You can straightaway pick a different document that better suits what you're after.

Pay as you like, start learning straight away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and smashed it. It really can be that simple.”

Alisha Student

Frequently asked questions