ECE 462 Object-Oriented Programming using C++ and Java. Flickering and Double Buffering

Similar documents
ECE 462 Object-Oriented Programming using C++ and Java. Scheduling and Critical Section

ECE 462 Object-Oriented Programming using C++ and Java. Parallelism

eservices checklist Online account access estatements Online bill payment Mobile check deposit (requires mobile app) Debit card

i-power Transaction Error Corrections & Reversals Last Revised: 9/12/16 Version:

Netiks International Mobile Banking Solution

BUSINESS ADVANTAGE USER GUIDE

In addition to these resources, our staff will be on hand to help walk you through any questions or concerns you have post-conversion.

3. How do I transfer money using PesaLink from my ABC Bank account?

ATM Use Cases. ID: CIS Title: Check Balance Description: Customer aims to know the balance in his/her account

(C) 2010 Pearson Education, Inc. All rights reserved. Dr. Marenglen Biba

MEMBER SERVICE AND TELLER QUESTIONNAIRE

SPOTCASH MOBILE APPLICATIONS USER GUIDE

ECE 462 Object-Oriented Programming using C++ and Java. Multi-Player Game using Network

Unified Modeling Language (UML)

Practical UML : A Hands-On Introduction for Developers

Practical UML - A Hands-On Introduction for Developers

Technology Upgrade User Guide

a. The following method would allow an object of the static type List<String> to be passed to it as an argument.

PNC Prepaid Card Programs Cardholder Website How-To Manual

Frequently Asked Questions Mobile Banking App

First Florida Credit Union Mobile e-deposits FAQs

POPA MOBILE BANKING USER GUIDE

The Hong Kong Polytechnic University

ECE 462 Object-Oriented Programming using C++ and Java. Graphical User Interface

CH 13 APPLICATION ANALYSIS

ECE 462 Object-Oriented Programming using C++ and Java. Key Inputs in Java Games

UML Is Not a Methodology

Five EASY Steps to Switch to

Object-Oriented Systems Development: Using the Unified Modeling Language

Overview + Navigation // Business ebanking Mobile

DESKTOP. User & Administrative Guide

Provident s New Core Banking System. Presented by: John Haggarty, VP Marketing

Consumer Health & Spending Accounts (CHSA) Banking and Payment Changes. Transitioning from ADP to WageWorks July 2017

Debit CardValet FAQs. Table of Contents. General... 2 Registration... 2 Controls and Alerts... 3 Transactions Debit CardValet FAQs Page 1

Registration. Adding Accounts. How do I sign up for this service? The sign-up process for this service is quite simple.

You will first be brought to the Account Summary screen where you will need to select Payments on the left side of your screen to access ClickSWITCH.

Mobile Banking Guide-Web Enabled Devices

MyChoice Cardholder User Guide

HOW CANADIANS BANK. Annual tracking study on Canadian attitudes and behaviours towards banking. Prepared for:

You can use your PIN to complete your purchases at point-of-sale and for ATM transactions.

Team One Mobile Banking App DETAILED ENHANCEMENTS

Requirements document for an automated teller machine. network

KCCU Online Banking - For Members Use

INTRODUCTION TO UNIFIED MODELING MODEL (UML) & DFD. Slides by: Shree Jaswal

Outline for Today CSE 142. Programming a Teller Machine. CSE142 Wi03 I-1. ATM Algorithm for Dispensing Money

Banking System Upgrade - Frequently Asked Questions (FAQs)

OFX Server Frequently Asked Questions

ECE 462 Object-Oriented Programming using C++ and Java. Lecture 17 Yung-Hsiang Lu

The Guide below is to help assist Users in navigating our Cash Management Online Banking

Point West Mobile Banking App. A Comprehensive Guide

The first time (and only the first time) you log on to your account, you will get a welcome screen.

Consumers Use of Mobile Financial Services 2015

Internet & Mobile Banking

Today s Agenda UML. CompSci 280 S Introduction to Software Development. 1.Introduction UML Diagrams. Topics: Reading:

Payment Systems Statistics

Practical Session 2: Use Cases and a Requirements Model.

BUSINESS ONLINE & MOBILE BANKING ACCOUNT ACCESS

Mobile Banking Guide

Consumer Banking User Guide. Account Details and History

Quicken Personal Finance Software for Windows Account Conversion Instructions. BACK UP YOUR CURRENT DATA (ALL customers)

Prepaid Access MIDWEST ANTI-MONEY LAUNDERING CONFERENCE Federal Reserve Bank of Kansas City March 5, 2014

Transaction History User s Guide

1st Semester MTCE 601A COMPUTER SYSTEM SOFTWARE

Food Service (Portal)

Mobile App User Guide

BM1602 Sales Activity Screen Table of Contents

Steps to draw down NSF funding

DESIGNING A BIOMETRIC STRATEGY (FINGERPRINT) MEASURE FOR ENHANCING ATM SECURITY IN INDIAN E-BANKING SYSTEM

Welcome to Your. Online Banking Experience

SWITCH KIT INSTRUCTIONS

ALERTS! Customer Tutorial

ClinCard Reference Guide: Site Coordinator

Phone Banking BSP. User Guide. Why wait in line? Bank by phone with BSP. Bank South Pacific.

NGN CURe Authorization

BFS VISA PREPAID CARDS FREQUENTLY ASKED QUESTIONS (FAQ S)

ClinCard Reference Guide: Site Coordinator

Mobile App User Guide

THE CREDIT UNION PREPAID CARD YOUR GUIDE

How to Create a PayPal Account

Higher Reach Online Registration

Spend Smart & Save Smart

Consumer Banking User Guide. Checks

(Toll-Free) # IMPORTANT DATES AND CRITICAL INFORMATION

ipad Frequently Asked Questions Page 1

Frequently Asked Questions Retiro Móvil (Mobile Withdrawal)

EBIONETWORXS FLASH TRAINING MANUAL

Also, you continue to perform standard functionalities such as: View account balance and details Bills payment and fund transfer

Internet Banking User Guide

1. Load the page :

EZ Parent Center Directions Parent Sign Up and Meal Preordering

TouchPay Enabling the Future of Payments. Toasted Cafe Case Study

Smart Account. 0.25% of value thereafter

Scout Association of Hong Kong

DB Ex 6. You have just started a new job at the bank. This is a schema of the database consists of 5 tables:

Adding Cash to your Student Card

Data Entry Oracle FLEXCUBE Universal Banking Release [May] [2011] Oracle Part Number E

PSCUnow Mobile App Guide

Click E Money Laravel Application

INTERNAL ACCOUNTS SURVEY

NetBanking Manage your finances by clicking and not by walking to the branch, from any computer with internet access.

Transcription:

ECE 462 Object-Oriented Programming g using C++ and Java Flickering and Double Buffering Yung-Hsiang Lu yunglu@purdue.edu d YHL Double Buffering 1

Flickering YHL Double Buffering 2

No Flickering YHL Double Buffering 3

Flickering Goal: continuously iterate through the three images Approach: draw background first then draw an image Problem: occasionally, only the background is shown on the screen without any of the three images Result: the character sometimes disappears YHL Double Buffering 4

Interleaving of Drawing and Display public void draw(graphics g) { // draw background g.drawimage(bgimage, 0, 0, null); } sent to screen // draw image g.drawimage(anim.getimage(), 0, 0, null); YHL Double Buffering 5

Possible Solutions erase and draw difference find the differences between each pair of images is not trivial. Interleaving is still a problem. make draw atomic (i.e. cannot interleave) When the screen refreshes and drawing is incomplete, the screen will appear black. YHL Double Buffering 6

Double Buffering + Page Flipping double buffering buffer 1: working buffer for drawing, incomplete, invisible to user buffer 2: completed, shown on screen switching between the two buffers for frame updates page flipping the pixels are not copied instead, a pointer switching between the two buffers flipping between monitor refresh buffer 1 buffer 2 screen YHL Double Buffering 7

YHL Double Buffering 8

YHL Double Buffering 9

window.createbufferstrategy(2); BufferStrategy strategy = window.getbufferstrategy(); Graphics g = strategy.getdrawgraphics(); draw(g); g.dispose(); strategy.show(); YHL Double Buffering 10

Screen Manager with BufferStrategy YHL Double Buffering 11

Automatic Document Generation using Javadoc YHL Double Buffering 12

YHL Double Buffering 13

YHL Double Buffering 14

YHL Double Buffering 15

YHL Double Buffering 16

YHL Double Buffering 17

YHL Double Buffering 18

YHL Double Buffering 19

YHL Double Buffering 20

YHL Double Buffering 21

YHL Double Buffering 22

YHL Double Buffering 23

YHL Double Buffering 24

YHL Double Buffering 25

YHL Double Buffering 26

Images may be stored in volatile memory for performance reasons. YHL Double Buffering 27

AnimationTest2 Using ScreenManager YHL Double Buffering 28

Using ScreenManager POSSIBLE_ MODES: an array of different DisplayMode create ScreenManager findfirstcompatiblemode(possible_modes) setfullscreen(displaymode) animationloop getgraphics draw dispose update YHL Double Buffering 29

YHL Double Buffering 30

YHL Double Buffering 31

YHL Double Buffering 32

YHL Double Buffering 33

ECE 462 Object-Oriented Programming g using C++ and Java Moving Image: Sprite Yung-Hsiang Lu yunglu@purdue.edu d YHL Sprite 1

YHL Sprite 2

YHL Sprite 3

Sprite YHL Sprite 4

YHL Sprite 5

YHL Sprite 6

YHL Sprite 7

YHL Sprite 8

SpriteTest1 YHL Sprite 9

YHL Sprite 10

YHL Sprite 11

YHL Sprite 12

YHL Sprite 13

YHL Sprite 14

ECE 462 Object-Oriented Programming g using C++ and Java Unified Modeling Language Yung-Hsiang Lu yunglu@purdue.edu d YHL UML 1

Unified Modeling Language UML why to model? abstraction, ignore details, or multiple levels of details identify participating objects communicate with people use tools to generate code, check correctness... why UML? language independent platform independent international standard expressive (state, sequence, time, interface...) tool rich (UML code, code UML... ) YHL UML 2

YHL UML 3

YHL UML 4

UML Example in Netbeans YHL UML 5

YHL UML 6

YHL UML 7

YHL UML 8

YHL UML 9

What Does a Model Say? relationships among objects which objects participate in an activity actions and interfaces transitions of attributes sequence of actions specialization, composition, ownership quantities In addition, one critical value of a model is to help a developer think before doing. YHL UML 10

Modeling a Bank objects: people: customers, tellers, bank managers, loan evaluators, ATM maintainers... data: accounts properties: branch offices, ATM machines, furniture... actions: deposit, withdraw, apply for loans, approve or reject applications, collect money from ATM... relationships among objects customer can deposit, withdraw cash, or talk to teller customer cannot talk to ATM maintainer ATM maintainer cannot approve or reject loan applications ATM can accept deposit; desk cannot... YHL UML 11

YHL UML 12

YHL UML 13

Model States and Transitions Many objects' behaviors depend on the values (i.e. state) of the objects' attributes. age vote account balance withdraw available credit purchase Objects' behaviors often follow strict orders based on the transitions of the attributes. vending machine must accept payment before returning changes customer must open an account before withdrawing money a user must enter the password before checking email a bank customer must insert the ATM card and enter PIN before deposit YHL UML 14

YHL UML 15

Sequence of Actions State diagrams do not express the objects involved. For example, the previous diagram does not specify the necessity of a customer and an ATM machine. In fact, three objects are involved customer ATM account (and the balance) YHL UML 16

YHL UML 17

Class Diagram YHL UML 18

YHL UML 19

Quantity YHL UML 20

YHL UML 21

Start a UML Project in Netbeans YHL UML 22

YHL UML 23

YHL UML 24

YHL UML 25

YHL UML 26