Escrito por estudiantes que aprobaron Inmediatamente disponible después del pago Leer en línea o como PDF ¿Documento equivocado? Cámbialo gratis 4,6 TrustPilot
logo-home
Ensayo

BTEC LEVEL 3 - UNIT 14 - EVENT DRIVEN PROGRAMMING

Puntuación
4.2
(19)
Vendido
39
Páginas
42
Subido en
15-08-2017
Escrito en
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

Institución
Grado

Vista previa del contenido

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

Libro relacionado

Escuela, estudio y materia

Nivel de Estudio
Editores
Tema
Curso

Información del documento

Subido en
15 de agosto de 2017
Archivo actualizado en
18 de abril de 2018
Número de páginas
42
Escrito en
2015/2016
Tipo
ENSAYO
Profesor(es)
Desconocido
Grado
Desconocido

Temas

$15.02
Accede al documento completo:
Comprado por 39 estudiantes

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF


Documento también disponible en un lote

Reseñas de compradores verificados

Se muestran 7 de 19 comentarios
5 año hace

good!

6 año hace

6 año hace

6 año hace

Good Basic Introduction, examples are useful and well commented

6 año hace

Thanks for your review. How can it be improved?

7 año hace

7 año hace

Thanks for your review how can it be improved?

7 año hace

7 año hace

Thanks for the review.

7 año hace

7 año hace

Thanks for your review. How can it be improved?

4.2

19 reseñas

5
8
4
7
3
3
2
1
1
0
Reseñas confiables sobre Stuvia

Todas las reseñas las realizan usuarios reales de Stuvia después de compras verificadas.

Conoce al vendedor

Seller avatar
Los indicadores de reputación están sujetos a la cantidad de artículos vendidos por una tarifa y las reseñas que ha recibido por esos documentos. Hay tres niveles: Bronce, Plata y Oro. Cuanto mayor reputación, más podrás confiar en la calidad del trabajo del vendedor.
xeon Brunel University
Seguir Necesitas iniciar sesión para seguir a otros usuarios o asignaturas
Vendido
1164
Miembro desde
8 año
Número de seguidores
850
Documentos
33
Última venta
9 meses hace
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 reseñas

5
137
4
71
3
44
2
30
1
38

Documentos populares

Recientemente visto por ti

Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes