Pointer Problem (URGENT!!!)
I have a problem with my code, it goes like this:
I have a set of rules e.g
rule 1:if getIncome() < 0 && getProfit() >5
rule 2:if getIncome() > 0 && getProfit() < 6
such that some actions are carried out for the rules. whereby getIncome() and getProfit() are both methods that obtain the income and profit variables of a specific objects of a specific class
I now create another rule with its own income and profit variables but now replace its own first part with the first part of rule1 and its second part with the second part of rule 2:
new rule:if getIncome() < 0 && getProfit < 6
Problem: I realised that getIncome() of newrule starts to point to income of rule1 and getProfit of newrule starts to point to profit of rule2. All i am interested in is changing the rules not pointing to the values stored in the parent rules. I want the rules adjusted, but new rule points to its own variables.

