Examples
   GUIs
   Simulation (e.g., simulating customer arrival/departure)
   Animation (use trains from lumosity)

Characteristics of Event Driven Programming
   Event-Driven: Event occurs and you update state info
   Event Queue: Stores the events in the order in which they arrive. The
	OS removes events in FIFO order and dispatches them to the window
	system to be dealt with.
   
Differences between Event Driven Programs and Imperative
	Programs
   External versus Internal Control
   Distributed versus Central Control
   Event-driven-independent, cooperating processes
	versus centralized authority

We will talk about GUIs, specifically Direct Manipulation Interfaces
   -Display concrete objects that represent application
	state and can be manipulated by a user
        (e.g., Desktop)
   -Good for novices/intermediate users who make use of 
	recognition memory
   	--Experts prefer text-oriented interfaces that
		make use of recall memory

Components
   --Presentation component: Pictorial interface that
	displays the application's state (output side)
   --Behavior component: Behavior that application displays
	in response to user input (input side)

Presentation Component
   --Widgets: Predefined pieces of graphics, called the look, and
	behavior, called the feel, that allow the user to
	interact with the application
	--application-independent
	--stored in libraries
	--examples: menus, text boxes, radio buttons, sliders
   --Custom Graphics: graphics composed from primitive objects
	like rectangles, lines, bitmaps and text that are
	application-dependent

Behavior Component
   OS --> generates event --> window manager --> application
        --event drivers: software that tells the OS how to map
	   input received by a hardware device to events that are
	   recognized by the OS
	--if directed at widget, programmer doesn't have to do
		anything
	--if directed at custom graphics, programmer must write
	 	an event handler which is termed a callback
		procedure

	--must provide feedback
	    syntactic feedback: provided during operation--lets
		the user know what is going on and what might
		happen if they terminated the interaction
	    semantic feedback: provided when the operation
		completes: permanently modifies the interface