>> In a calculation application I want to create a new class that
>> interacts with the user to get a problem specification. Currently
[quoted text clipped - 10 lines]
>
> I would tend to avoid doing lots of blocking IO inside constructors.
If it's OK to do any, shouldn't it be OK to do lots? More generally, what
is the reason not to do blocking I/O in constructors?
> You may want to consider writing a helper class that will allow you to
> interact with your users. A class with static helper methods will do
[quoted text clipped - 15 lines]
>
> Something like this would be cleaner in my opinion.
That's pretty much what I've already got, but the parsing and validation
code is substantial enough that I want to move it out of my main class (the
one containing: public static void main(...)) into its own class. E.g.,
strings that are input each have to be validated as to content, numbers as
to range, etc.; and some of the validation is contextual, depending on
previous responses.

Signature
For mail, please use my surname where indicated:
steve@surname.reno.nv.us (Steve Brecher)
Graham - 24 Nov 2006 09:41 GMT
Constructors are just used to ensure that objects are placed into a
valid state when first instantiated. They are not designed to do "real"
work (which is why they don't have a return value and they are not
inherited).
Use constructors to initialise the object, and then call methods to
perform operations.
Graham
http://www.modernsecuritysolutions.com