19. Algorithms II

136 views

Published on

Published in: Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
136
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
1
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

19. Algorithms II

  1. 1. From last time… • Refactored Pong into classes: PongTable, PongBall, & PongPaddles! • Added methods: pause(), restart(), & countIn() • FYI checkout the Table class & methods
  2. 2. Algorithms II CAP
  3. 3. Demo! Add Game Methods 1. Reset! 2. Pause! 3. Count Down
  4. 4. Demo! Add More Stuff! 1. Game Manager! 2. Sound Effects (a library)
  5. 5. Debugging Techniques • Comment out lines // or blocks /* … */! • Use print() and println() to check values! • Use setters and getters (encapsulation):! ! setXpos(25); ! getXpos();
  6. 6. For next time… • Office Hours: Friday class cancelled but you can schedule time for this Friday, 10a–12:30p! • Homework 3: due Friday, via email, by 5pm! • Reading: Shiffman, p. 201–214 (Mathematics I)! • Quiz 4: Monday, March 10 (Algorithms, Debugging, & Libraries)

×