From reading your additional posts about the constraints placed upon how you had to do this project: This may sound a bit harsh, but I'm sure there are others here thinking it.

/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

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.