Variables
-
Upload
paul-daniels -
Category
Documents
-
view
224 -
download
3
Transcript of Variables
![Page 1: Variables](https://reader036.fdocuments.us/reader036/viewer/2022082809/55779bd1d8b42a410a8b4d60/html5/thumbnails/1.jpg)
WelcomeWelcome
1. Name one of the rules for creating a valid Java identifier
Mr. Daniels
![Page 2: Variables](https://reader036.fdocuments.us/reader036/viewer/2022082809/55779bd1d8b42a410a8b4d60/html5/thumbnails/2.jpg)
Valid Identifiers…Valid Identifiers…1. must start with a letter2. consist of only letters and
numbers; no symbols, punctuation or spaces
3. cannot use reserved words4. use capitals for each new word in a
phrase
![Page 3: Variables](https://reader036.fdocuments.us/reader036/viewer/2022082809/55779bd1d8b42a410a8b4d60/html5/thumbnails/3.jpg)
2 Gas Mileage2 Gas Mileage
A car's gas tank holds 23 gallons and averages 15 miles per gallon. How far can the car go on one tank of gas?
![Page 4: Variables](https://reader036.fdocuments.us/reader036/viewer/2022082809/55779bd1d8b42a410a8b4d60/html5/thumbnails/4.jpg)
2 Gas Mileage2 Gas Mileage
We need 3 variables
How much gasoline the tank can hold
Miles per gallon Distance on a tank
![Page 5: Variables](https://reader036.fdocuments.us/reader036/viewer/2022082809/55779bd1d8b42a410a8b4d60/html5/thumbnails/5.jpg)
3 Perimeter of a Triangle3 Perimeter of a Triangle4 variables
Leg A
Leg B
Leg C
A
B
C
![Page 6: Variables](https://reader036.fdocuments.us/reader036/viewer/2022082809/55779bd1d8b42a410a8b4d60/html5/thumbnails/6.jpg)
4 Area of a Circle4 Area of a Circle3 variables
pi
distance from the edge to the center
![Page 7: Variables](https://reader036.fdocuments.us/reader036/viewer/2022082809/55779bd1d8b42a410a8b4d60/html5/thumbnails/7.jpg)
5 Circumference of a Circle5 Circumference of a Circle3 variables
pi
distance through the center
![Page 8: Variables](https://reader036.fdocuments.us/reader036/viewer/2022082809/55779bd1d8b42a410a8b4d60/html5/thumbnails/8.jpg)
6 Area of Rectangle6 Area of Rectangle
The length of a rectangle is 9, the width is 5. Find the area of the rectangle.
![Page 9: Variables](https://reader036.fdocuments.us/reader036/viewer/2022082809/55779bd1d8b42a410a8b4d60/html5/thumbnails/9.jpg)
6 Area of a Rectangle6 Area of a Rectangle
![Page 10: Variables](https://reader036.fdocuments.us/reader036/viewer/2022082809/55779bd1d8b42a410a8b4d60/html5/thumbnails/10.jpg)
7 Perimeter of a Rectangle7 Perimeter of a Rectangle
The length of a rectangle is 5, the width is 3. Find the perimeter of the rectangle.