Sponsored Link •
|
Advertisement
|
Advertisement
|
This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.
Message:
> Dear Friends, > I would appreciate if you could give me a hand with this assignment. > For example DF27 TRF > The first letter indicates the zone where it was registered, the second letter indicates a city within that zone. > The program must be able to identify the zone, city and date from any car registration. > I have a list of zones, cities and dates, but have no idea on what method to use or how to start the programing. > I would appreciate if you could give me any information on what I need to do to make this program. > Thank you. > P. If you are asking how to go about parsing the string and identifying the zone, city and dates, here is one possible way. Since the registration is a string, you could create 4 substrings that hold the zone, city, and two date values from the registration string. You could do this using the substring method from the String class (look in the Java Documentation for details). Then, you could just create four methods that take each substring and check the respective list to find a match. If you need any further help, just post ur specific question and any code that u've gotten so far. Replies:
|
Sponsored Links
|