I want a good solution to handle the good and error
> conditions in java.
> The details of my project are:
> There are
> categories and A,B,C,D subcategories that a user can
> get but there are several checks before giving them
> access to category screen or subcategory screen.
> 1. 18th category can be given only with 2nd and 12th
> category, or 15th and 5th, or 16th and 5th, or 17th
> and 5th. if 18th category is added with any other
> combination, show error.
> 2. 12, 15, 16 and 17th categories cannot be provided
> together for a user.
> 3. only A and B can be added to 12 and 15 categories,
> to allow them into subcategory screen,any other
> subcategory added should allow the user into category
> 4. only C can be added to 16 or 17 th category to
> allow access into subcategory screen, any other
> combination is an error.
> 3. Any other combination of categories other than the
> above are good for a user and should be given access.