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