This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Cattle Drive and the fly likes Question on OOP-4 Requirements Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » This Site » Cattle Drive
Bookmark "Question on OOP-4 Requirements" Watch "Question on OOP-4 Requirements" New topic
Author

Question on OOP-4 Requirements

Daniel Loranz
Ranch Hand

Joined: Jun 17, 2008
Posts: 41
For OOP-4 (Lookup) ...

1. Is it OK to simply use 1,2,3, ... 12 as the serial numbers? Seems like doing so would keep nitpicker life moderately simpler.

2. The assignment only asks for a string of info about a particular item. My first thought is to simply use a long string of descriptive text for each item. (eg - "This is a book called blah, written by blah, which costs blah to rent , etc.") But this approach doesn't seem in spirit with the assignment purpose to learn all about polymorphism. There would not be anything really different from a video item and a furniture item.

So, I'm guessing I should really define a variety of relevant fields for each class, and build the text string from a particular instance of field values. Is this second approach more in keeping with the assignment goal?

Thank you very much.
- Dan
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9044
    
  10
You can use anything you want for the serial number(s).

Your second approach sounds more like what we are looking for.


JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Question on OOP-4 Requirements
 
Similar Threads
depricated mathod stop(), no alternate??
OOP considered harmful (was: C. Date on UML book)
XML for Assignment Log
Too much of a good thing: over-nitpicking of Say.java?
Simple File IO Question...Please Help!!!