I have a number of command line programs that take a variety of inputs. Depending on the inputs the program functions differently. For example, the program could take A and C as inputs and produce B and D as outputs. Alternatively, the program could take B and D as inputs and produce A and C as outputs. As another alternative, the program could take A and D as inputs and produce B and C as outputs.
The thing is that I have seven inputs and a handful of outputs. The problem is that the part of my program that handles user input is very messy. I don't have any particularly good strategy to fix this. Has anyone dealt with this issue before? Are there any good ways to clean up the mess?