Implement 2 functions to find a business in a city and business name within a certain distance. (Distance formula provided)
Budget: $10 – $30 USD
A. FindBusinessBasedOnCity(cityToSearch, saveLocation1, collection) – This function
searches the ‘collection’ given to find all the business present in the city provided in
‘cityToSearch’ and save it to ‘saveLocation1’. For each business you found, you should
store the name, full address, city, and state of the business in the following format. Each
line of the saved file will contain: Name$FullAddress$City$State. ($ is the separator and
must be present.)
B. FindBusinessBasedOnLocation(categoriesToSearch, myLocation, maxDistance,
saveLocation2, collection) – This function searches the ‘collection’ given to find the
name of all the businesses present in the ‘maxDistance’ from the given ‘myLocation’
(please use the distance algorithm given below) and save them to ‘saveLocation2’. Each
line of the output file will contain the name of the business only.
searches the ‘collection’ given to find all the business present in the city provided in
‘cityToSearch’ and save it to ‘saveLocation1’. For each business you found, you should
store the name, full address, city, and state of the business in the following format. Each
line of the saved file will contain: Name$FullAddress$City$State. ($ is the separator and
must be present.)
B. FindBusinessBasedOnLocation(categoriesToSearch, myLocation, maxDistance,
saveLocation2, collection) – This function searches the ‘collection’ given to find the
name of all the businesses present in the ‘maxDistance’ from the given ‘myLocation’
(please use the distance algorithm given below) and save them to ‘saveLocation2’. Each
line of the output file will contain the name of the business only.
Related categories:
NoSQL