What directories do you need? Where should you place javadoc documentation? Where does the database binary file go? You must answer these questions before submitting your solution. You can approach the file structure of your project in two parts : how to package the classes and how to organize all the files into a single JAR file. The application for your certification consists of your source code defining the classes that make up your solution. Regardless of how you build these classes, the source files should be separate from the class files. Remember that using too many directories or throwing everything into a single directory indicates weak organization of your file structure. Placement is debatable for only a few classes. For example, you will probably include a class that is the connection factory. Where should you place it? I placed mine in the database directory, but you could argue for the client or server directory. Otherwise, the directory for the majority of classes is obvious. The following structure is an example you might consider adapting for your project submission:
Notice that the mypackage directory will likely be the directory Sun uses in the source structure you downloaded. I recommend using the same one Sun does. The straightforward approach to organizing your application files is to place the GUI in the client directory, the database binary and associated files in the database directory, and the RMI or socket-specific files in the server directory. Therefore, *.class files go under mypackage , *.java files under source , and *.html files under doc . Some candidates overengineer their project and submit a huge number of files. At the other extreme, some candidates cram too much functionality in too few classes. Both approaches will receive poor scores. Remember that whatever directory you place a class in, you must use the proper corresponding package declaration, such as this example: package mypackage.client; |