Name; Emmanuel Isiya
Reg: DITC01/4751/2022
1) Define the following terms
Event handles,eventlisteners,programming enviroment ,transaction
analysis and uses interface.
-Events : is an action or occurrence that a program can detect and
respondto.
-Event handlers : are functions that tell how to respond to an event
andthe major types mouse events keyboard events.
-Event listeners : are functions in programming that wait for and respond
to a specific events such as e.g mouse click when the event occurs the
event listener executes the predefined codes or faction.
-Programming enviroment : it is a set of tools and software that helps
you write test compile debug interprete your code.
-Transaction analysis : it is managing the series of events that occur
during transaction.
-User interface : it is a part in software applications that users interact
with this are things the user can see and control e.g. buttons,menus.
2) Discuss 5 types of actions prepared by a user that demontrates an event
(4mrks)
-Mouse events : click when the user presses and releases a mouse button.
-Keyboard events : keydown when the user presses down and control has
focus.
-Window events : scrolls when the user scrolls the page.
-Touch events (for touchscreens) : touchend when user stops touching the
screen.
-Form events : submit when a form is submitted
3) Advantages of event driven programming.(5marks)
-Customizability : custom events developers can define custom events
tailored to specific application needs.
-Responsiveness : improved user experience EDP allows applications to
respond immediately to user inputs.
-Ease of development : simplified logic.
-Scalability : scalable design applications can scale to handle a huge
amount of events efficiently.
-Real time systems : used in real time applications EDP for example
4) Discuss three types of controls used in event driven programming.
(6marks)
-Button controls : push button clickable button that initiates an action
when pressed.
-Text controls : input field this is where user enters text.
-Slider control : allows user to select a value from a continous range by
sliding.
-Date and time control : date picker allows user to pick the date from a
calendar interface time control allows user to pick the time.
5) Outline four methods used in a form in a VB program.
-Form intialization and loading.
-Form closing and loading.
-Control events.
-Mouse and Keyboard events.
6) State the correct data type for each of the following describtion of
statements
a) The height of a student (in cm). Continous
b) The academic grade of a student. Ordinal
c) Country states whether poor or rich. Categorical
d) The value of the kenyan shilling in ksh. Continous