Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Need help with this in python: name two classes, Airport and its specialized subclass GeoAirport, for the organization of airport information. Airport instances will encompass
Need help with this in python: name 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.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started