ACM programming contest

Slides:



Advertisements
Similar presentations
User Interface. What is a User Interface  A user interface is a link between the user and the computer. It allows the user and the computer to communicate.
Advertisements

Computer and Communication Fundamental Basic web programming Lecture 8 Rina Zviel-Girshin.
CS0004: Introduction to Programming Visual Studio 2010 and Controls.
1 Computer Graphics Chapter 2 Input Devices. RM[2]-2 Input Devices Logical Input Devices  Categorized based on functional characteristics.  Each device.
Stanford hci group / cs376 research topics in human-computer interaction UI Software Tools Scott Klemmer 27 October 2005.
Introduction to JavaScript. Aim To enable you to write you first JavaScript.
Graphical User Interfaces A Quick Outlook. Interface Many methods to create and “interface” with the user 2 most common interface methods: – Console –
3461 Sequential vs. Event-driven Programming Reacting to the user.
CS 0004 –Lecture 1 Wednesday, Jan 5 th, 2011 Roxana Gheorghiu.
Welcome to CIS 083 ! Events CIS 068.
By: Bryan Sanchez and Alex Lindenmayer. A command-line interface (CLI) is a mechanism for interacting with a computer operating system or software by.
Mr C Johnston ICT Teacher
OPERATING SYSTEM - program that is loaded into the computer and coordinates all the activities among computer hardware devices. -controls the hardware.
COSC 3461: Module 2 Control Flow Paradigms: Reacting to the User.
Different Types of HCI CLI Menu Driven GUI NLI
SCRIPT PROGRAMMING WITH FLASH Introductory Level 1.
MVC COMP 401 Fall 2014 Lecture 19 10/30/2014. Classic MVC 2
12-Jun-16 Event loops. 2 Programming in prehistoric times Earliest programs were all “batch” processing There was no interaction with the user Input Output.
Programming Logic and Design Seventh Edition Chapter 12 Event-Driven GUI Programming, Multithreading, and Animation.
Programming Paradigms, Software Architectural Patterns, and MVC CS 378 – Mobile Computing for iOS Dr. William C. Bulko.
Mr L Challenor ICT Teacher BTEC IT Unit 02 - Lesson 06 Computer Software.
Allows the user and the computer to communicate with each other.
Introduction To Visual Basic 6
Development Environment
Support for the Development of Interactive Systems
Scratch for Interactivity
Clocks, I/O devices, Thin Clients, and Power Management
Exceptional Control Flow
CHAPTER Reacting to the user.
Introduction to Computer CC111
Introduction to Event-Driven Programming
FOP: Buttons and Events
11.10 Human Computer Interface
Event-driven programming
Event loops 16-Jun-18.
CS101 Introduction to Computing Lecture 19 Programming Languages
An Introduction to Programming
CSC461 Lecture 8: Input Devices
Fundamentals of Programming I The Model/View/Controller Design Pattern
Understand Windows Forms Applications and Console-based Applications
Lesson 1: Buttons and Events – 12/18
Introduction to Events
Introduction to Computer Graphics with WebGL
Ellen Walker Hiram College
Event Driven Programming
Unit 14 Event Driven Programming
Informatics 43 – May 26, 2016.
X Windows.
Event loops.
GRAPHICAL USER INTERFACE
Isaac Gang University of Mary Hardin-Baylor
Interactive Programming
Event loops 17-Jan-19.
Event loops 17-Jan-19.
Fundamentals of Programming I The Model/View/Controller Design Pattern
Event loops 8-Apr-19.
Lecture 8 Programming Paradigm & Languages. Programming Languages The process of telling the computer what to do Also known as coding.
Tonga Institute of Higher Education IT 141: Information Systems
JavaScript and Events CS Programming Languages for Web Applications
Tonga Institute of Higher Education
An Introduction to Programming
Tonga Institute of Higher Education IT 141: Information Systems
Event loops.
Input and Interaction Ed Angel Professor Emeritus of Computer Science,
Event loops.
Event loops 19-Aug-19.
JavaScript and Events CS Programming Languages for Web Applications
An Introduction to the Windows Operating System
Presentation transcript:

ACM programming contest Put your programming skills to work Training available Local contest in early November Organizational meeting: Friday, September 20th, 2pm, in CSB 3033 Benefits: good for resume, connection to IBM, cash  Sep 18

Sequential vs. Event-driven Programming Reacting to the user

GUI Program Organization We will start by discussing two programs of identical functionality but different architecture. Then, we’ll see a more elaborate example. DemoHelloWorld.java DemoHelloWorld2.java DemoSwing.java Sep 18

Sequential Programming Flow of a typical sequential program Prompt the user Read input from the keyboard Parse the input (determine user action) Evaluate the result Generate output Repeat Sep 18

Example DemoTranslateEnglishConsole.java Prompt the user User input Output results Sep 18

Sequential Programming (2) In sequential programs, the program is under control The user is required to synchronize with the program: Program tells user it’s ready for more input User enters more input and it is processed Examples: Command-line prompts (DOS, UNIX) LISP interpreters Shouldn’t the program be required to synchronize with the user? Sep 18

Sequential Programming (3) Advantages Architecture is iterative (one step at a time) Easy to model (flowcharts, state machines) Easy to build Limitations Can’t implement complex interactions Only a small number of features possible Interaction must proceed according to a pre-defined sequence To the rescue… Event-driven programming Sep 18

Event-driven Programming Instead of the user synchronizing with the program, the program synchronizes with, or reacts to, the user All communication from user to computer occurs via events and the code that handles the events An event is an action that happens in the system A mouse button pressed or released A keyboard key is hit A window is moved, resized, closed, etc. Sep 18

Types of Events Typically two different classes of events User-initiated events Events that result directly from a user action e.g., mouse click, move mouse, key press System-initiated events Events created by the system, as it responds to a user action e.g., scrolling text, re-drawing a window Both types of events need to be processed in a UI User-created events may initiate system-generated events Sep 18

Example Program DemoKeyEvents.java Sep 18