design sanity check/advice

I'm relatively new to "real" object-oriented design/development (i.e. patterns/refactoring etc.) although I've been working with OOP languages for quite some time. I've been doing a lot of reading/research in order to take it to the next level and am incorporating it into a new project I'm working.

The app is a survey engine developed using Java/Spring/Hibernate. Surveys contain pages which contain questions (different variations of multiple choice and essay-type). Surveys exist in 3 distinct phases: survey design, survey response entry and survey analysis/reporting. I've started out with a domain model which represents just the design phase of a survey lifecycle. The classes contain just the information which needs to be persisted to define the structure/layout of the components.

e.g.:

publicclass SurveyDefinition{

private Long id;

private String title;

private String description;

private List pages =new ArrayList();

publicabstractclass QuestionDefinition{

private Long id;

private Integer questionNumber;

private String prompt;

privateboolean answerRequired;

private PageDefinition page;

.

.

.

}

publicabstractclass MultipleChoiceQuestionDefextends QuestionDefinition{

privateboolean singleAnswer;

private List choices =new ArrayList();

.

.

.

}

This initial design was really just created to get my feet wet with Hibernate to make sure that I could get all of the ORM inheritance/polymorphism/association mechanisms working. I have kind of a vague idea of where I want to take this but I want to make sure that I抦 not too far off base before I get too far into the design.

Does it make sense to have the survey design phase entities (e.g. SurveyDefinition, PageDefinition, QuestionDefinition etc.) as separate classes distinct from the survey response entry phase entities (e.g. Survey, Page, Question etc.)? I抦 thinking that the survey response entry phase entities really are different animals with richer behavior and that these could be created by passing the definition entities into a factory/creation class/method.

Are there any (other) strategies/patterns etc. that I might want to pursue?

Any suggestions/advice/admonitions/coaching/counseling/encouragement and/or hot stock tips would be greatly appreciated.

Thanks,

Gary

[3374 byte] By [GDW13a] at [2007-10-2 23:20:14]
# 1
Looks fine to me. You will probably form a stronger opinion as you start writing code. Can't plan it all up front.
_dnoyeBa at 2007-7-14 15:57:54 > top of Java-index,Other Topics,Patterns & OO Design...