Lecture 1 - Introduction To Event Driven Programming
Lecture 1 - Introduction To Event Driven Programming
Lecture 1 - Introduction To Event Driven Programming
Lecture 1- Introduction
Introduction
Objectives
• Program
• Programming
• Algorithm
• IDE
• Event
• Event Driven Programming
• Applications
Program
Photosynthesis
Program is a sequence of instructions expressed in a specific programming
language.
Semantics
• These are the meaning / interpretations of instructions.
Example: int x; // Declaration of variable x that will accept integers
Program…
Algorithm
Photosynthesis
Algorithm is a set of executable steps.
• Formula
• Uses mathematical expressions/theorems.
• To calculate the area A, of a rectangle
Area = Length x Width
Algorithm…
Algorithm Representation…
• Flow Chart
• The use of connected shapes with lines.
Algorithm…
Algorithm Representation…
• Pseudocode
• They are notations that resemble programming language representation.
• It is not executable by computing devices.
• Intended for human reading and not machine reading.
Debugger
• A computer program that assists in the detection and correction of errors
in computer programs. Debugging is the process of resolving this errors.
Source Code
• Any collection of computer instructions (possibly with comments) written
using some human-readable computer language, usually as text.
Programming…
Source File
• This is a document that sets the macro definitions for the source code in a
subdirectory.
Examples: .Java, .c, .cpp and .py files
Compiler
• This is a computer program (or a set of programs) that transforms source
code written in a programming language (the source language) into
another computer language (the target language), with the latter often
having a binary form known as object code.
Linker
• A linker or link editor is a computer program that takes one or more object
files generated by a compiler and combines them into a single executable
file.
Programming Language
Photosynthesis
Programming Language is a set of instructions, written in a specific style,
that can be used to construct a program.
Event Listeners
• Objects that respond to events.
Event Handler
• Segment of code executed in response to a generated event.
• They are methods/functions.
• Activated when trigger occurs.
Event occurs when an event listener detects an event trigger and responds by
running an event handler(a method/function).
Event…
Example: Forms
Event…
Example: Forms
Event…
Event Initiators
• The inputs to event driven programs come from autonomous
event initiators.
• They include:
• Human
• Sensors
• Other programs
• …
Event…
Example: Analog and Digital PORTs
• Embedded Devices and Sensors
• Model
• The implementation.
• Example: Computer POS software
• View
• The output.
• Controller
• Input mechanisms.
• Examples: Buttons, menus, combo boxes.
Graphical User Interface(GUI)
Photosynthesis
Graphical User Interface is window of a running program instance.
• Books
• E-books
• Library