/me straps on his nuclear accelerated flame thrower...
Either the professor was trying to keep you from succeeding at this project on purpose, or he is a screaming moron.
You had to create a separate type of object for each day of the week? As jeffa rightly points out, you should make a 'day' object and then instanciate one for each day of the week. Why have different classes? The last time I checked Monday and Tuesday were not so ratically different that they would require two different types of objects. One of the guiding principles of OO design in the first place is to make a object to represent some number of like things. Days of the week are most certainly like things.
As for program size limitations. I have never, never, NEVER been told that my program couldn't be over a certain number of lines. My professors were concerned with 1) does it work 2) is it designed well 3) is the code maintainable and well documented.
/me loans flame thrower to Cestus....you'll be needing this the next time you go to class.
Choose the right tool for the job. At this point you may not know what the right tool is, but it seems like you're starting to see. There are some times when OO is the right way. There are some times when OO isn't. But there is never a time when a poor design OO or otherwise is the right way (especially if thrust upon you).
When in doubt, seek other's opinions...your professor isn't always right.
/\/\averick
perl -l -e "eval pack('h*','072796e6470272f2c5f2c5166756279636b672');"
In reply to Re: OO 2 death?
by maverick
in thread OO 2 death?
by Cestus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |