From last time…
• Refactored Pong into classes:
PongTable, PongBall, & PongPaddles!
• Added methods:
pause(), restart(), & countIn()
• FYI checkout the Table class & methods
Algorithms II
CAP
Demo!
Add Game Methods
1. Reset!
2. Pause!
3. Count Down
Demo!
Add More Stuff!
1. Game Manager!
2. Sound Effects (a library)
Debugging Techniques
• Comment out lines // or blocks /* … */!
• Use print() and println() to check values!
• Use setters and getters (encapsulation):!
! setXpos(25);
! getXpos();
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)

More Related Content

PDF
18. Algorithms
PDF
33. Input II
PDF
32. Input I
PDF
A. Design Thinking Lecture
PDF
20. Mathematics I
PDF
13. Objects II
PDF
14. Arrays I
PDF
15. Final Project - Iteration 1
18. Algorithms
33. Input II
32. Input I
A. Design Thinking Lecture
20. Mathematics I
13. Objects II
14. Arrays I
15. Final Project - Iteration 1

Viewers also liked (13)

PPTX
Grantley Adams
PPTX
Presentation1
PPTX
Wc unit 3 work place commuication
PDF
White Paper: From Accounts Receivable to Smarter Receivables
PPTX
Executive Certificate in Public Procurement
PDF
21. Mathematics II
PPSX
How to reuse old objects by 4th 1st EES N ° 4 (Frías Sergio & Décimo Sebastián)
PPTX
Are your beliefs holding you back from success?
PPTX
Resume Guidelines
PDF
30. Text II
PDF
23. Final Project Iteration II
PDF
Wedding books настя виталий
PDF
2. Processing
Grantley Adams
Presentation1
Wc unit 3 work place commuication
White Paper: From Accounts Receivable to Smarter Receivables
Executive Certificate in Public Procurement
21. Mathematics II
How to reuse old objects by 4th 1st EES N ° 4 (Frías Sergio & Décimo Sebastián)
Are your beliefs holding you back from success?
Resume Guidelines
30. Text II
23. Final Project Iteration II
Wedding books настя виталий
2. Processing
Ad

More from Joseph Murphy (18)

PDF
29. Text I
PDF
28. Video II
PDF
27. Video I
PDF
26. Images II
PDF
25. Images I
PDF
24. Translation & Rotation II
PDF
34. Final Project Iteration 3
PDF
22. Translation & Rotation I
PDF
12. Objects I
PDF
11. Functions II
PDF
10. Function I
PDF
9. Loops II
PDF
8. Loops I
PDF
7. Conditionals II
PDF
6. Conditionals I
PDF
5. Variables
PDF
4. Interaction
PDF
3. Final Project - Intro
29. Text I
28. Video II
27. Video I
26. Images II
25. Images I
24. Translation & Rotation II
34. Final Project Iteration 3
22. Translation & Rotation I
12. Objects I
11. Functions II
10. Function I
9. Loops II
8. Loops I
7. Conditionals II
6. Conditionals I
5. Variables
4. Interaction
3. Final Project - Intro
Ad

Recently uploaded (20)

PDF
BP 505 T. PHARMACEUTICAL JURISPRUDENCE (UNIT 1).pdf
PDF
medical_surgical_nursing_10th_edition_ignatavicius_TEST_BANK_pdf.pdf
DOCX
Cambridge-Practice-Tests-for-IELTS-12.docx
PDF
Mucosal Drug Delivery system_NDDS_BPHARMACY__SEM VII_PCI.pdf
PDF
AI-driven educational solutions for real-life interventions in the Philippine...
PPTX
Module on health assessment of CHN. pptx
PDF
Complications of Minimal Access-Surgery.pdf
PDF
Vision Prelims GS PYQ Analysis 2011-2022 www.upscpdf.com.pdf
PDF
FOISHS ANNUAL IMPLEMENTATION PLAN 2025.pdf
PPTX
B.Sc. DS Unit 2 Software Engineering.pptx
PDF
Hazard Identification & Risk Assessment .pdf
PDF
LIFE & LIVING TRILOGY- PART (1) WHO ARE WE.pdf
PPTX
Computer Architecture Input Output Memory.pptx
PDF
David L Page_DCI Research Study Journey_how Methodology can inform one's prac...
PDF
LEARNERS WITH ADDITIONAL NEEDS ProfEd Topic
PDF
Skin Care and Cosmetic Ingredients Dictionary ( PDFDrive ).pdf
PDF
BP 704 T. NOVEL DRUG DELIVERY SYSTEMS (UNIT 1)
PPTX
Introduction to pro and eukaryotes and differences.pptx
PDF
LIFE & LIVING TRILOGY - PART - (2) THE PURPOSE OF LIFE.pdf
PDF
BP 704 T. NOVEL DRUG DELIVERY SYSTEMS (UNIT 2).pdf
BP 505 T. PHARMACEUTICAL JURISPRUDENCE (UNIT 1).pdf
medical_surgical_nursing_10th_edition_ignatavicius_TEST_BANK_pdf.pdf
Cambridge-Practice-Tests-for-IELTS-12.docx
Mucosal Drug Delivery system_NDDS_BPHARMACY__SEM VII_PCI.pdf
AI-driven educational solutions for real-life interventions in the Philippine...
Module on health assessment of CHN. pptx
Complications of Minimal Access-Surgery.pdf
Vision Prelims GS PYQ Analysis 2011-2022 www.upscpdf.com.pdf
FOISHS ANNUAL IMPLEMENTATION PLAN 2025.pdf
B.Sc. DS Unit 2 Software Engineering.pptx
Hazard Identification & Risk Assessment .pdf
LIFE & LIVING TRILOGY- PART (1) WHO ARE WE.pdf
Computer Architecture Input Output Memory.pptx
David L Page_DCI Research Study Journey_how Methodology can inform one's prac...
LEARNERS WITH ADDITIONAL NEEDS ProfEd Topic
Skin Care and Cosmetic Ingredients Dictionary ( PDFDrive ).pdf
BP 704 T. NOVEL DRUG DELIVERY SYSTEMS (UNIT 1)
Introduction to pro and eukaryotes and differences.pptx
LIFE & LIVING TRILOGY - PART - (2) THE PURPOSE OF LIFE.pdf
BP 704 T. NOVEL DRUG DELIVERY SYSTEMS (UNIT 2).pdf

19. Algorithms II

  • 1. From last time… • Refactored Pong into classes: PongTable, PongBall, & PongPaddles! • Added methods: pause(), restart(), & countIn() • FYI checkout the Table class & methods
  • 3. Demo! Add Game Methods 1. Reset! 2. Pause! 3. Count Down
  • 4. Demo! Add More Stuff! 1. Game Manager! 2. Sound Effects (a library)
  • 5. Debugging Techniques • Comment out lines // or blocks /* … */! • Use print() and println() to check values! • Use setters and getters (encapsulation):! ! setXpos(25); ! getXpos();
  • 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)