Hi,
I need advice on the best way to handle a table or matrix solution. For example, if I have a table such as:
A B C D
1 true false false true
2 false false false false
3 false true false false
4 false false false true
I don't want to code a bunch of 'if' statements to return the value contained in the table based on the coordinates. Doing so would be messy and hard to extend and maintain.
I know that there must be a better way to solve this in an OOP approach. I need to do this in Java. Any suggestions would be appreciated.
I need advice on the best way to handle a table or matrix solution. For example, if I have a table such as:
A B C D
1 true false false true
2 false false false false
3 false true false false
4 false false false true
I don't want to code a bunch of 'if' statements to return the value contained in the table based on the coordinates. Doing so would be messy and hard to extend and maintain.
I know that there must be a better way to solve this in an OOP approach. I need to do this in Java. Any suggestions would be appreciated.