sd1230 unit 6 desktop applications. course objectives during this unit, we will cover the following...

32
SD1230 Unit 6 Desktop Applications

Upload: jessie-gordon

Post on 13-Dec-2015

221 views

Category:

Documents


0 download

TRANSCRIPT

SD1230

Unit 6Desktop Applications

Course Objectives

• During this unit, we will cover the following course objectives:– Identify the characteristics of desktop

applications.– Describe the differences and similarities of

desktop, website, and mobile technology.

Learning Outcomes

• Completing this unit should help enable you to:– Identify the characteristics of desktop applications.– Create a simple desktop application.– Given a website or application, identify characteristics that

affect its usability on a desktop computer.– Compare the application development learning path for

applications typically supported on desktop computers with the learning path for those found on mobile devices.

Learning Outcomes (cont.)

– Use the programming IDE environment with Visual Basic 2010.

– Understand how to create and modify a console-based application.

– Understand the logic of decision programming with conditional and loop statements.

– Understand how to create and modify a windows application with objects such as text boxes, buttons, and message boxes.

Desktop Applications

• Applications you run on a laptop or desktop computer

• Examples:– Microsoft Office– Graphics programs– Integrated development environments (IDEs)– Games

Desktop Application Types

• Graphical User Interface (GUI)– Typically has one or more windows– User interacts through menus, buttons, and text

fields• Console application– User interacts by typing commands

Desktop vs. Mobile ApplicationsDesktop Mobile

Window size Large and adjustable Limited by screen sizeUser input Keyboard, mouse,

audio, other recording devices

Keypad, touch screen, d-pad, voice

Output Screen, printer, larger internal storage

Smaller SD card storage, printing through Bluetooth

Resources Large range of processing and memory configurations

Limited to mobile processing and memory resources

Desktop vs. Mobile Application Context

Typically stationary

Dedicated concentration

Desktop

On the move

Distracted concentration

Mobile

Program ScaleSmall

program

Small program

Small program

Large program

Scale of a Problem

• Based on the following factors:– Difficulty of the solution– Number of functions in the solution– Amount and diversity of data in the solution

Analyzing a Small-Scale Problem

• What is the input data?• What is the output information?• What are the formulas/processes you have to

use to solve this problem by hand?• Are there special conditions?

Rock-Paper-Scissors Example

• Input– Mode– Names of the players– Choice of paper, rock, or scissors

• Output– Winner of the game

Rock-Paper-Scissors Example

• Tasks– Determine the winner and display the result.– Compute the computer’s move.– Obtain the user’s move.– Obtain the name of the user.

Rock-Paper-Scissors Example

• Ordered tasks1. Obtain the name of the user.2. Compute the computer’s move.3. Obtain the user’s move.4. Determine the winner and display the result.

Algorithm to Obtain Name

Algorithm for the Computer’s Move

Options for Obtaining Inputfor User’s Move

• Menu– Less error prone– More consistent– Short menus are user

friendly– Long menus are difficult

to follow

• User enters a string– High probability for error

• User enters an abbreviation– Must convert to string

for output purposes

Algorithm for the User’s Move

Input Validation

Algorithm for Determining the Winner

Main Algorithm

Random Numbers

Demographics Program Example

• Input Data– Ethnicity information– Number of people in the chosen population

• Output data– Data and distribution table

Demographic Example Tasks

•Display a menu•Obtain the user’s selection•Execute the selection

Menu-related tasks

•Display a list of data•Enter data into a list•Compute the diversity distribution

Operations performed after menu option is

selected

Main Algorithm

Enter Data Algorithm

Display Data Algorithm

Display Demographics Algorithm

Display Demographics Algorithm

Switch Statement

Switch Statement vs. If-Else

Summary

• In this unit, we covered the following topics:– Desktop applications– GUI applications– Desktop vs. mobile applications– Console applications– Algorithms– Visual Basic