SlideShare ist ein Scribd-Unternehmen logo
1 von 6
Downloaden Sie, um offline zu lesen
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)

Weitere ähnliche Inhalte

Andere mochten auch

Resume Guidelines
Resume Guidelines Resume Guidelines
Resume Guidelines
Shama Salman
 
23. Final Project Iteration II
23. Final Project Iteration II23. Final Project Iteration II
23. Final Project Iteration II
Joseph Murphy
 

Andere mochten auch (13)

Grantley Adams
Grantley AdamsGrantley Adams
Grantley Adams
 
Presentation1
Presentation1Presentation1
Presentation1
 
Wc unit 3 work place commuication
Wc unit 3 work place commuicationWc unit 3 work place commuication
Wc unit 3 work place commuication
 
White Paper: From Accounts Receivable to Smarter Receivables
White Paper: From Accounts Receivable to Smarter ReceivablesWhite Paper: From Accounts Receivable to Smarter Receivables
White Paper: From Accounts Receivable to Smarter Receivables
 
Executive Certificate in Public Procurement
Executive Certificate in Public ProcurementExecutive Certificate in Public Procurement
Executive Certificate in Public Procurement
 
21. Mathematics II
21. Mathematics II21. Mathematics II
21. Mathematics II
 
How to reuse old objects by 4th 1st EES N ° 4 (Frías Sergio & Décimo Sebastián)
How to reuse old objects by 4th 1st EES N ° 4 (Frías Sergio & Décimo Sebastián)How to reuse old objects by 4th 1st EES N ° 4 (Frías Sergio & Décimo Sebastián)
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?
Are your beliefs holding you back from success?Are your beliefs holding you back from success?
Are your beliefs holding you back from success?
 
Resume Guidelines
Resume Guidelines Resume Guidelines
Resume Guidelines
 
30. Text II
30. Text II30. Text II
30. Text II
 
23. Final Project Iteration II
23. Final Project Iteration II23. Final Project Iteration II
23. Final Project Iteration II
 
Wedding books настя виталий
Wedding books настя виталийWedding books настя виталий
Wedding books настя виталий
 
2. Processing
2. Processing2. Processing
2. Processing
 

Mehr von Joseph Murphy (18)

29. Text I
29. Text I29. Text I
29. Text I
 
28. Video II
28. Video II28. Video II
28. Video II
 
27. Video I
27. Video I27. Video I
27. Video I
 
26. Images II
26. Images II26. Images II
26. Images II
 
25. Images I
25. Images I25. Images I
25. Images I
 
24. Translation & Rotation II
24. Translation & Rotation II24. Translation & Rotation II
24. Translation & Rotation II
 
34. Final Project Iteration 3
34. Final Project Iteration 334. Final Project Iteration 3
34. Final Project Iteration 3
 
22. Translation & Rotation I
22. Translation & Rotation I22. Translation & Rotation I
22. Translation & Rotation I
 
12. Objects I
12. Objects I12. Objects I
12. Objects I
 
11. Functions II
11. Functions II11. Functions II
11. Functions II
 
10. Function I
10. Function I10. Function I
10. Function I
 
9. Loops II
9. Loops II9. Loops II
9. Loops II
 
8. Loops I
8. Loops I8. Loops I
8. Loops I
 
7. Conditionals II
7. Conditionals II7. Conditionals II
7. Conditionals II
 
6. Conditionals I
6. Conditionals I6. Conditionals I
6. Conditionals I
 
5. Variables
5. Variables5. Variables
5. Variables
 
4. Interaction
4. Interaction4. Interaction
4. Interaction
 
3. Final Project - Intro
3. Final Project - Intro3. Final Project - Intro
3. Final Project - Intro
 

Kürzlich hochgeladen

1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
fonyou31
 

Kürzlich hochgeladen (20)

fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 

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)