Project: License Plate Generator (Revisited)
Assume that you supply software for the Department of Motor Vehicles in all 50 states. Write a program that generates all the possible license plate numbers and then prints the total number of plates at the very end. Your program should accept one command line argument that provides the pattern to use when generating licenses. Any of the characters 'A'-'Z' represents the alpha characters in the plate number whereas any of the characters '0'-'9' represents digits. Any other character just represents itself.
Your program should contain a function that accepts one character from the pattern and returns an array containing all the possible characters that character could represent. For the alphabetic pattern don't allow 'I', 'O' and 'S' letters because they can be confused with digits.
Start with license plate numbers that use the pattern ABC-123. Run the program with the pattern that your state uses. See [[License Plate Designs]]. Make sure your program works with the following patterns:
American Samoa | 1234 |
Arkansas | 123 ABC |
California | 1ABC234 |
Delaware | 123456 |
Missouri | AB1 C2D |
Nevada | 12A-345 |
Rhode Island | 123-456 |
Tennessee | A12-34B |