Question: Summary For this assignment we will read a list of cities from a file, ask the user to select two cities, then determine the distance
Summary
For this assignment we will read a list of cities from a file, ask the user to select two cities, then determine the
distance between them. As we all know, I hope, the earth is not flat. Therefore, the distance between two points is
not a straight line, but the Great Circle Orthodromic Distance. You can find some help with equation here:
Dflatlonlatlon
Specifications
Create an empty project and add files as required.
You will use an ntier design.
o You should have a DAL for reading the file.
o You will need to create a City class and a CitiesList class, at a minimum for the business layer.
Load the given data file into the CitiesList objects.
o The presentation layer should be its own module and handle IO
o The main module should only contain the main method and start the process. Total of four modules in
the project.
The City class should contain the name, latitude, and longitude. It should also contain a method to calculate
the distance from it to another city, return a string of the city, other methods as needed.
You will be graded on the design of your class consider coding conventions, comments, with methods should
be static, dunders, etc...
Ask the user for the following information:
You will prompt the user for the name of city.
o NOTE: Do not assume the user will enter valid data for example they may not enter a city which exists
in the list In fact, DO NOT assume ANY of the input for this assignment is valid.
The top bottom N
o If the user enters then this means the closest and farthest cities. This should be any number
between and inclusive.
The radius
o If the user enters then display all the cities within the km radius. The distance should be any float
value between and
You will display the results as shown below.
Do not forget the Python Docstring your grade will, in part, depend on the quality of these comments
Make sure you have all required comments, and your name is included in your code.
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
