際際滷

際際滷Share a Scribd company logo
Welcome 1. Name one of the rules for creating a valid Java identifier Mr. Daniels
Valid Identifiers must  start  with a letter consist of only  letters  and  numbers ; no symbols, punctuation or spaces cannot use  reserved  words use  capitals  for each new word in a phrase
Common Data Types points = scan.nextInt(); price = scan.nextDouble(); sentence = scan.nextLine(); letter = scan.next().charAt(0);
2 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?
2 Gas Mileage We need 3 variables How much gasoline the tank can hold   Miles per gallon  Distance on a tank
3 Perimeter of a Triangle 4 variables Leg A  Leg B  Leg C  A B C
4 Area of a Circle 3 variables pi   distance from the edge to the center
5 Circumference of a Circle 3 variables pi   distance through the center
6 Area of Rectangle The length of a rectangle is 9, the width is 5. Find the area of the rectangle.
6 Area of a Rectangle
7 Perimeter of a Rectangle The length of a rectangle is 5, the width is 3. Find the perimeter of the rectangle.

More Related Content

Variables

  • 1. Welcome 1. Name one of the rules for creating a valid Java identifier Mr. Daniels
  • 2. Valid Identifiers must start with a letter consist of only letters and numbers ; no symbols, punctuation or spaces cannot use reserved words use capitals for each new word in a phrase
  • 3. Common Data Types points = scan.nextInt(); price = scan.nextDouble(); sentence = scan.nextLine(); letter = scan.next().charAt(0);
  • 4. 2 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?
  • 5. 2 Gas Mileage We need 3 variables How much gasoline the tank can hold Miles per gallon Distance on a tank
  • 6. 3 Perimeter of a Triangle 4 variables Leg A Leg B Leg C A B C
  • 7. 4 Area of a Circle 3 variables pi distance from the edge to the center
  • 8. 5 Circumference of a Circle 3 variables pi distance through the center
  • 9. 6 Area of Rectangle The length of a rectangle is 9, the width is 5. Find the area of the rectangle.
  • 10. 6 Area of a Rectangle
  • 11. 7 Perimeter of a Rectangle The length of a rectangle is 5, the width is 3. Find the perimeter of the rectangle.