will factory pattern work here?

From: Mark F (me_at_isp.com)
Date: 11/29/04


Date: Mon, 29 Nov 2004 13:14:39 -0600

I have a problem where I need one of several types returned depending on
a user selection. I was planning on using a factory pattern as these
types can all be related by a base class. The only problem is my
concrete classes may not have all the same properties. Can I still use
a factory pattern or should I use something else?

Example:

Abstract Class Document:
name
title
subject

Concrete Class Report extends Document:
reportno
keywords

Concrete class Drawing extends Document:
drawingno

Thanks,
-Mark