Pure Programmer
Blue Matrix


Cluster Map

Project: License Plate Generator

Assume that you work for the Department of Motor Vehicles. Write a program that generates all the possible license plate numbers and then prints the total number of plates at the very end.

Start with license plate numbers that are composed of three alphabetic (capital) letters, a dash then three digits. Don't allow 'I', 'O' and 'S' letters because they can be confused with digits. Modify the program to match the pattern that your state uses. See [[License Plate Designs]].

Output
$ javac -Xlint LicensePlates1.java $ java -ea LicensePlates1 AAA-000 AAA-001 AAA-002 AAA-003 AAA-004 AAA-005 AAA-006 AAA-007 AAA-008 AAA-009 ... ZZZ-991 ZZZ-992 ZZZ-993 ZZZ-994 ZZZ-995 ZZZ-996 ZZZ-997 ZZZ-998 ZZZ-999 Total: 12167000

Solution