Method of Sorting? by assiging numerical values to Strings
I remember there was some sort of method to assign a numerical value to values in an array, unfortunaetly I forgot how to do so, can anyone help?
If I remember correctly the example in my old book was if there was a gear that had 3 settings stored in an array
{LOW, MID, HIGH}
Then they used some sort of method on this array and were able to use LOW, MID, HIGH as if they were numbers, also because of the order LOW was assigned the lowest numerical value, MID was assigned on higher than LOW but smaller than HIGH, etc
They were then able to use LOW MID HIGH in a switch statement
Thanks guys
Never Mind I figured it out, the method is enumerated types