Link to home
Start Free TrialLog in
Avatar of Sreejith22
Sreejith22Flag for India

asked on

Help required in designing a Java application

I am seeking the help for the best Java design that I should use for a particular scenario described below.

1) A button press generates a String Array that contains 'n' strings.

2) I need to check whether this 'Generated Array' contains a pre-defined string(out of 'n' pre-defined strings).

3) If the 'Generated Array' contains any of the pre-defined strings, I need to take an action.

What is the best way of designing this application/ How should I model the classes?

Following is the raw thought I have

1) Main class which handles the Array Generation on Button press
2) A dedicated class for pre-defined strings in which I define 10, 100 , 1000 or more pre-defined strings alone?
3) A dedicated class to handle the actions, if match occurs between 'Generated Array' strings and pre-defined string?

Is this the correct model? Are there any other better design than this?


Best suggestions and guiding is much appreciated
Avatar of HonorGod
HonorGod
Flag of United States of America image

When you say "a button press", that implies a graphical user interface (GUI).
Did you really mean that?

If so, which GUI framework will you be using?  Swing?

How familiar are you with event driven application development?
SOLUTION
Avatar of gatorvip
gatorvip
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanx 4 axxepting