Well champion, honestly, I just started coding without creating any diagram first. I see that sometimes it is a "must" (due to the policy of the company you work for, for instance)... or you may want to come up with a class/sequence diagram before coding in order to guide your development. Although most of the time it is a good idea to have a class diagram (to document your design and help future maintenances), it isn't really necessary to create one for the assignment. I myself didn't create any diagram, but if you feel more comfortable creating a diagram before coding, feel free!
So that's why I want a clear plan before coding. I read this article http://www.ibm.com/developerworks/java/library/j-genericdao.html to reduce number of classes. And still looking some other design solutions for my situation. And begin draw UML because of the trouble I just mentioned.
Jianping Wang wrote:Recently I am running into a trouble for my company projects: I have 12 Dao, and every Dao has an interface, so 24 classes/interface. That's just persistence layer. In my present layer, Struts, I have to create 12 Forms and 12 domain classes. And what's more there is one class has 32 variables, all have to be validated and converted!!
The SCJD assignment certainly will not be that huge: 1 dao will result in 2 files (1 class and 1 interface). And your model class (if you create one) will have 6-7 properties. If you just work with the String you won't have a model class.