Question: Need help with this in python, please: Design two classes, Airport and its specialized subclass GeoAirport, for the organization of airport information. Airport instances will
Need help with this in python, please: Design two classes, Airport and its specialized subclass GeoAirport, for the organization of airport information. Airport instances will encompass fundamental data such as IATA codes, names, and locations. On the other hand, GeoAirport instances will provide additional features by incorporating geographic coordinates and a compilation of nearby airports within a km range. The GeoAirport class will include a method named nearbyairports to generate a wellformatted string displaying the nearby airports.
The program will process input in six different formats utilizing commandline arguments captured in sysargv:
Execute the script with an IATA code as an argument.
Execute the script with latitude and longitude in MS format.
Execute the script with latitude and longitude in MS format, and specify the number of nearest airports.
Execute the script with latitude and longitude in decimal format.
Execute the script with latitude and longitude in decimal format, and specify the number of nearest airports.
Execute the script with a substring of the airport name.
The script will retrieve airport data from files named "airports" and "airportcoordinates". In cases where no matching format is identified, it will resort to substring matching within airport names.
Few Examples:
Command: python ais.py SFO, would output: SFO San Francisco International Airport San Francisco, California, United States; deg N deg W
Airports near: km HAF Half Moon Bay Airport Eddie Andreini Sr Airfield
Airports near: km OAK Oakland International Airport
Airports near: km SQL San Carlos Airport
Airports near: km HWD Hayward Executive Airport
Airports near: km SJC Norman Y Mineta San Jose International Airport
Another example, for command: python ais.py output would be:
km SFO San Francisco International Airport San Francisco, California, United States
km OAK Oakland International Airport Oakland California, United States
km SJC Norman Y Mineta San Jose International Airport San Jose, California, United States
km SMF Sacramento International Airport Sacramento California, United States
km MRY Monterey Regional Airport Monterey California, United States
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
