- Spend some time working on your project.
Now that we have learned a little more about regular expressions and how to use and apply them in Java, it's time to apply this new knowledge to our projects!
Modify the Airport
class to have an airport code. Consider the following
instructions:
- Add a three-character airport code to the
Airport
class.- The airport code must consist of three capital letters, like such:
- DEN (Denver International Airport).
- PHL (Philadelphia International Airport).
- PAW (Pawnee Airport).
- The airport code must consist of three capital letters, like such:
- Modify the
AirportReservationDriver
class.- Update the method where the user can add an airport.
- When the user adds an airport, validate that the airport code meets the above format.
- Tips:
- Use Regex 101 when needed.
- Refer to the Java Documentation as needed. Below are some resources.