File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Cattle Drive and the fly likes instructors solution for OOP-4 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » This Site » Cattle Drive
Bookmark "instructors solution for OOP-4" Watch "instructors solution for OOP-4" New topic
Author

instructors solution for OOP-4

Timo Richter
Greenhorn

Joined: Dec 11, 2006
Posts: 10
Thanks Marilyn for the final nitpick on OOP-4 (Lookup) I tried to run the instructors solution but it didn't compile due to multiple public classes existing in the source file 'Lookup.java':

My question:
Was it intended to divide the code, to create separate source-files for the classes Thing, Video, BookOnTape and Furniture and to compile then separately (this way it works on my machine)?

Regards
Timo
Pauline McNamara
Sheriff

Joined: Jan 19, 2001
Posts: 4012
    
    6
Yep, you got it.


Oops, almost forgot... congratulations on getting through the OOPs part of the Cattle Drive!
[ October 22, 2007: Message edited by: Pauline McNamara ]
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9053
    
  12
For convenience, it appears to be all in one file when we send assignments and solutions back and forth. However, in my opinion, it is better to keep one file per outer class.


JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Timo Richter
Greenhorn

Joined: Dec 11, 2006
Posts: 10
Thank you both. However this was the first time for me to recognize that I declared my outer classes with the (implicit) package access modifier that keeps the whole thing running in one file as well as the compiler refuses to accept several public (means outer) classes in one .java file.

On to these servlets...

Regards
Timo
[ October 23, 2007: Message edited by: Timo Richter ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: instructors solution for OOP-4