hey thanks for your response. I'm fairly new with Java so I really appreciate your support! I'm working on a project for school that requires a method called createAllCombinations(int i)
The basic idea of the createAllCombinations method is to determine which combinations of constants from the domain, when substituted for each unique variable in the predicate list, make the predicate list true. A single combination of constants is called a possible solution. A possible solution that makes the predicate list true is called a solution. Substituting for “each unique variable” means that when we substitute a constant c for a variable v, we substitute c for all occurrences of v. If there exists at least one solution, then the createAllCombinations method returns true, otherwise it returns false.
Right now this is what I have so far!
protected boolean createAllCombinations(int i)
if(variables.length == i)
/** The variables to be used in this method:
/** Declaring the iterator and array of constants
Iterator<Constant> itr = Domain.iterator();
arrayConstant = new Constant[variables.length];
/** Get all constants from the domain
for(int n = 0; n > variables.length-1; n++)
value = itr.next();
arrayConstant[n] = value;
/** Gather the Identifier to swap with the constant
var = variables[i];
constant = arrayConstant[i];
/**Substitute the constant we get from the domain for variables[i], wherever it occurs in the predicate list
I'm wondering if I can substitute where I get the variable (for example Bob) I would have to take all those values and replace it with a constant. I am not sure how to perform this in Java. Any pointers or hints?
For Each ctrl As Control In Me.Controls("pnlMainPanel").Controls
If ctrl.GetType Is GetType(System.Windows.Forms.Panel) Then
For Each subCtrl As Control In ctrl.Controls
If subCtrl.GetType Is GetType(System.Windows.Forms.TextBox) Then
If subCtrl.GetType Is ...