Lecture 32, CS 302-6, November 16

  1. Various things
    1. Office hours this week:

                                                               i.     Today, 1-2:30

                                                             ii.     Tomorrow, 12:30-2:30

  1. Review:
    1. Overloading methods
    2. Public vs private
    3. Overriding .equals
  2. Exam 2
    1. Things to think about:

                                                               i.     Don’t make code more complicated than it needs to be:

1.    http://chaosinmotion.com/blog/?p=622

2.     http://www.ioccc.org/

a.    International Obfuscated C Code Contest

b.    http://en.wikipedia.org/wiki/International_Obfuscated_C_Code_Contest

                                                             ii.     Things you can do to avoid confusing code:

1.    Use clear variable/method names

2.    Use appropriate whitespace

3.    Don’t go out of your way to be ‘tricky’/clever

a.    Clear is more important than concise

  1. Letters/Envelopes example
  2. Input validation
    1. An OOP approach

                                                               i.     InputValidation.java

                                                             ii.     Validator.java

  1. Homework – For Friday – Study