Presentation is loading. Please wait.

Presentation is loading. Please wait.

Variables, operators, canvas, and multimedia

Similar presentations


Presentation on theme: "Variables, operators, canvas, and multimedia"— Presentation transcript:

1 Variables, operators, canvas, and multimedia
Dr. José M. Reyes Álamo

2 Outline Variables Operators Canvas

3 Variables

4 Properties and variables
In general the memory is a set of cells or slots, like spread sheet, where we store data. Properties and variables are named memory slots What is the difference? We use variables and properties to store information used within our app.

5 An example Variable definition Name the variable cost=0
Assign initial value Using the variable within an event handler Set a value Get the value cost=0 profit=0 price=0 On Button1.Click cost=7 profit=5 price=cost + profit Label1.text = price In class create an application that executes an arithmetic operation with two numbers Something like this cost=0 profit=0 price=0 On Button1.Click cost=7 profit=5 prices=cost + profit Label1.text = price You can extend it to calculate salesPrice adding 0.07 of taxes or something like that Also create a better interface.

6 Variables on AppInventor
Numeric Variables:

7 Operators

8

9 Reference Arithmetic operators and other math blocks Logic operators
Logic operators

10 Canvas

11 Canvas is a pixels grid Reference: basic.html#Canvas 1 2 3 4

12 OpenLab and Blackboard
Check OpenLab for any new lab. Check Blackboard for any new quiz. Project: Brainstorm an idea Get professor's approval Post your idea in your portfolio Must work in teams of 2 or 3 It must be an app and the topic is open: a game, a tool, an enhanced version of a previous app


Download ppt "Variables, operators, canvas, and multimedia"

Similar presentations


Ads by Google