Feedback on LightsOnModel.java — cs21a, education

| -Uncategorized

From Miguel Paraz:

Yup. It reinforces the idea of attributes and minimizes the problem with same-named parameters and local variables.

>

(They should know that they can omit this. most of the time, but it's still a good idea.)

Just be careful with constructors that set the field from a parameter, as in: http://www.jspwiki.org/Wiki.jsp?page=WhyUsingThisIsBad

You can comment with Disqus or you can e-mail me at sacha@sachachua.com.