Sreejith22
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
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
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Thanx 4 axxepting
Did you really mean that?
If so, which GUI framework will you be using? Swing?
How familiar are you with event driven application development?