Distance IPOI Density Package Package a collection of functions. procedures, and constants (outlined below) that allow the determination of distance...
View the step-by-step solution to:

Question

Please refer to the attached pictures from 2a to 2f.1575213368(1).jpg

/>1575213406(1).jpg1575213446(1).jpg

1575213368(1).jpg

2. Distance IPOI Density Package Package a collection of functions. procedures, and constants (outlined below) that allow the
determination of distance and density for Persons of Interest to Eagle Electronics. The package should be named: H‘W03 Note: the package must compile for it to be graded. If the package does NOT compile, a score
of 0 will be given for question 2. 2a 2]] Create a function named DEGREES_TO_RADIANS that converts a numeric
value fi'om degrees to radians. This function should only be internally accessible to the HWUS package (e.g..
accessible from within the package). Create a function named KM_T0_1\«IILES that converts a numeric value from
kilometers to miles. This function should be publically accessible to an},r able to use the HWU3
package. 5 pts. 2c Create an overloaded function named DISTANCE_BET“’EEN_ZIPS that
calculates the number of kilometers between any two zip codes. The function should: - accept two parameters (the two zip codes) 0 return a numeric distance in kilometers 0 use the DEGREES_TO_RADIANS function (question 2a) - returns a value of -1 if one or both of the zip codes provided is not in the
database 0 possesses a general exception handler This function should be publically accessible to an}’ able to use the HWU3 10 pts.

1575213406(1).jpg

package.
Note: Use a Haversine formula when calculating distances on this scale. Several
are available online
2d
Create an overloaded function named DISTANCE_BETWEEN_ZIPS that
2 pts.
calculates the number of kilometers between Eagle Electronics (located in zip
code '33605') and any other zip code.
The function should:
accept one parameter (the zip code)
return a numeric distance in kilometers
use the DEGREES_TO_RADIANS function (question 2a)
returns a value of -1 if one or both of the zip codes provided is not in the
database
possesses a general exception handler
This function should be publically accessible to any able to use the HW03
package
Note: no partial credit is available for this question unless Question 2c has been
successfully completed.
2e
Create a procedure named POI_WITHIN_DISTANCE that prints out all the
8 pts.
persons of interest within the specified radius
This procedure should:
accept a single parameter (distance in miles)
identify (e.g., print out) all persons of interest within the specified
distance from Eagle Electronics. Include:
the name of the individual in 'Lastname, Firstname' format
the appropriate company name (company name, supplier name,
Eagle Electronics, etc.)
o type of person of interest (e.g., Commercial Customer, Supplier,
etc.)
O
city
O
distance
use one of the DISTANCE_BETWEEN_ZIPS functions (question 2c or
2d)
use a function to translate distance (either 'km to miles' or 'miles to km')
possesses a general exception handler
This function should be publically accessible to any able to use the HW03
package
Note: no partial credit is available for this question unless Question 2c has been
successfully completed.
2f
Create a function named POI DENSITY that calculates the number of persons
5 pts.

1575213446(1).jpg

2f
Create a function named POI_DENSITY that calculates the number of persons
5 pts.
Page 3
CNIT 372: Database Programming
of interest within the specified radius.
The function should:
accept a single parameter (distance in miles)
return the number of persons of interest within the specified distance from
Eagle Electronics
use one of the DISTANCE_BETWEEN_ZIPS functions
use a function to translate distance (either 'km to miles' or 'miles to km")
possesses a general exception handler
This function should be publically accessible to any able to use the HW03
package.
Note: no partial credit is available for this question unless Question 2c has been
successfully completed.

Recently Asked Questions

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question
Ask Expert Tutors You can ask You can ask ( soon) You can ask (will expire )
Answers in as fast as 15 minutes