Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

project package

 
Ara Tatous
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my project I put DBAccess.java and Data.java in /suncertify/db.
But I put my other objects in other subdirectories under /suncertify.
For example I put my exception classes in /suncertify/exception directory.
Is there any freedom on how to design the project's package structure except for DBAccess interface and Data object?
Do we have to put all the classes under either /suncertify or /suncertify/db only?
 
Frans Janssen
Ranch Hand
Posts: 357
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ara,

I made multiple packages in my assignment; all of them starting with suncertify. It is allowed and I think even desirable that you should introduce new packages to divide your source files into logical units.

Frans.
 
Darya Akbari
Ranch Hand
Posts: 1855
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ara,

do you say that you have a package suncertify.exception? Why ?

Regards,
Darya
 
Darya Akbari
Ranch Hand
Posts: 1855
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ara,

be careful with package suncertify.exception . It can lead to an automatic failure depending on your assignment.

Regards,
Darya
 
Frans Janssen
Ranch Hand
Posts: 357
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Darya Akbari:
Ara,

be careful with package suncertify.exception . It can lead to an automatic failure depending on your assignment.

Hi Darya,

I assume that your remark refers to this specification from the instructions?
Any unimplemented exceptions in this interface must all be created as member classes of the suncertify.db package.

Frans.
 
Darya Akbari
Ranch Hand
Posts: 1855
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Frans,

correct. If Ara has something like this statement in his assignment then he maybe in trouble.

Regards,
Darya
 
Ara Tatous
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for all of your replies. I implemented those exception specified in the interface given by Sun in suncertify.db but I have my own exceptions also.
Exception folder maybe was a bad example but I have util,client,server,exception and the are all under /suncertify folder.
I think I'll keep all the exception in /suncertify/db, so I would have all my exception objects in one place. But the other folders I'll keep them as is with relevant objects in them.
 
Darya Akbari
Ranch Hand
Posts: 1855
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ara,

Having all your exceptions in an extra package (package suncertify.exception) is not good OO design. Look at the JDK itself. Do you see any package for exceptions?

A package suncertify.util looks fine.

Don't forget that OO design is valued and you may loose points for your concept.

Regards,
Darya
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic