# Class 08: Building Graphical Programs

Back to Loops. On to When Things Go Wrong.

Held Friday, February 5

Summary

Contents

Notes

• Today will be mostly lab, and little discussion.
• Some notes on assignment 2 are now available. I'll return assignment 2 on Monday.
• Because the answer key is available, I will no longer accept assignments.
• I've graded assignment 1 (or at least most of the copies I received). Everyone should read my notes on assignment 1.
• I've graded the quizzes. Here's what I would have expected as an answer to ``Write an `isWinter` method that determines whether the current date is between Dec. 21 and March 20 (inclusive), without using `if` or other control structures.'' (Comments are not necessary.)
```   /**
* Determine whether the current date is between Dec. 21 and
* March 20 (inclusive).
*/
public boolean isWinter() {
return ( ((this.month == 12) && (this.day >= 21)) ||
(this.month == 1) || (this.month == 2) ||
((this.month == 3) && (this.day <= 20)) );
} // isWinter()
```
• The quiz is worth one ``unit'' of extra credit. I have not yet determined a mapping between units of extra credit and extra credit points, although two units typically equal one point.
• I'd prefer that you include parens, even when they're not strictly necessary.
• You had a thought assignment for today: what do you expect to find as common errors in loops?

## Lab

Do G1.1., G1.2 (only step 1), G1.3, and (if time permits) G1.5.

History

• Created Monday, January 11, 1999.
• Added short summary on Friday, January 22, 1999.
• Added notes section on Friday, February 5, 1999.

Back to Loops. On to When Things Go Wrong.

Disclaimer Often, these pages were created "on the fly" with little, if any, proofreading. Any or all of the information on the pages may be incorrect. Please contact me if you notice errors.