void changeRule (string old rule name , string new rule name)This method allows you to change one rule to another in the same place in the rule set.For example, say you have three rules in your rule set …