cs 104 october 26, 2011 app inventor. agenda discuss guest speakers discuss quiz finish paint pot...

11
CS 104 October 26, 2011 App Inventor

Upload: eustace-chase

Post on 26-Dec-2015

212 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: CS 104 October 26, 2011 App Inventor. Agenda Discuss guest speakers Discuss quiz Finish Paint Pot Discuss concepts from Chapters 2 & 3 Mole Mash (if time

CS 104October 26, 2011

App Inventor

Page 2: CS 104 October 26, 2011 App Inventor. Agenda Discuss guest speakers Discuss quiz Finish Paint Pot Discuss concepts from Chapters 2 & 3 Mole Mash (if time

Agenda Discuss guest speakers Discuss quiz Finish Paint Pot Discuss concepts from Chapters 2 & 3 Mole Mash (if time permits)

Page 3: CS 104 October 26, 2011 App Inventor. Agenda Discuss guest speakers Discuss quiz Finish Paint Pot Discuss concepts from Chapters 2 & 3 Mole Mash (if time

Terminology Components Behaviors Sensor Arrangement Canvas Event Event Handler Variable Image Sprite Procedure

Page 4: CS 104 October 26, 2011 App Inventor. Agenda Discuss guest speakers Discuss quiz Finish Paint Pot Discuss concepts from Chapters 2 & 3 Mole Mash (if time

Components

Used in the design portion

ButtonUser clicks the button

and some action occurs.

CanvasCan display an image or appear blank. The user

can interact with the canvas while running the

app.

CheckboxThe user makes a

selection from a list of options.

ImageCan be for added appeal, but it is a static element.

LabelDescriptive text for the

user to read.

TextboxBox for in which the user

enters information.

Page 5: CS 104 October 26, 2011 App Inventor. Agenda Discuss guest speakers Discuss quiz Finish Paint Pot Discuss concepts from Chapters 2 & 3 Mole Mash (if time

Arrangements

Purpose Helps organize components Makes the screen more readable

Horizontal Arrangement

Vertical Arrangement

Page 6: CS 104 October 26, 2011 App Inventor. Agenda Discuss guest speakers Discuss quiz Finish Paint Pot Discuss concepts from Chapters 2 & 3 Mole Mash (if time

Behaviors

Behaviors are the actions of the components Some components in the design may require

some action, it is up to the programmer to create these actions

Page 7: CS 104 October 26, 2011 App Inventor. Agenda Discuss guest speakers Discuss quiz Finish Paint Pot Discuss concepts from Chapters 2 & 3 Mole Mash (if time

Events and Event Handlers

Some components such as a button require a trigger, an event, to occur in order for the behavior to begin

A button is clicked A canvas is touched Once the event takes place, an event handler

is required (the event must have code associated with it) in order for some action to occur

Page 8: CS 104 October 26, 2011 App Inventor. Agenda Discuss guest speakers Discuss quiz Finish Paint Pot Discuss concepts from Chapters 2 & 3 Mole Mash (if time

Sensors Sensors read in information and pass it along AccelerometerSensor

Shaking Measure acceleration

LocationSensor Longitude Latitude Altitude (device dependent) Address

OrientationSensor (device shouldn’t be moving) Roll Pitch Azimuth

Page 9: CS 104 October 26, 2011 App Inventor. Agenda Discuss guest speakers Discuss quiz Finish Paint Pot Discuss concepts from Chapters 2 & 3 Mole Mash (if time

Variable

A place in memory that holds various information

Page 10: CS 104 October 26, 2011 App Inventor. Agenda Discuss guest speakers Discuss quiz Finish Paint Pot Discuss concepts from Chapters 2 & 3 Mole Mash (if time

Procedure

A block of code we use to prevent rewriting the same code repeatedly

Two types Procedure that returns a value (like a reporter

block in BYOB) Procedure that does not return a value (like a

command block in BYOB)

Page 11: CS 104 October 26, 2011 App Inventor. Agenda Discuss guest speakers Discuss quiz Finish Paint Pot Discuss concepts from Chapters 2 & 3 Mole Mash (if time

What’s Next

Team Project #2