SlideShare una empresa de Scribd logo
1 de 6
Descargar para leer sin conexión
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)

Más contenido relacionado

Destacado

Wc unit 3 work place commuication
Wc unit 3 work place commuicationWc unit 3 work place commuication
Wc unit 3 work place commuicationGanesha Pandian
 
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 ReceivablesMoretonSmith
 
Executive Certificate in Public Procurement
Executive Certificate in Public ProcurementExecutive Certificate in Public Procurement
Executive Certificate in Public Procurementwillmsu17
 
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)Sergio Manuel Frías
 
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?Travis Jenkins
 
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 IIJoseph Murphy
 
Wedding books настя виталий
Wedding books настя виталийWedding books настя виталий
Wedding books настя виталийAlex Stepanov
 

Destacado (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
 

Más de 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
 

Último

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 SDThiyagu K
 
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 . pdfQucHHunhnh
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
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
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 

Último (20)

Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
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
 
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
 
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
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
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 AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 

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)