Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Introduction In this assignment you will write a small C program. Your program should compile correctly and produce the specified output. Please note that the
Introduction In this assignment you will write a small C program. Your program should compile correctly and produce the specified output. Please note that the computer program should comply with the commenting and formatting rules as has been done in class. For example, there should be a header for the whole program that gives the author's name, class name, date, and description. End braces should be commented, and there are alignment and indenting requirements as discussed. Please ask if you have any questions. Problem Statement The 911 service is developing an application that will help the dispatcher attending emergency calls, to find the nearest/closest service to the place where the emergency occurred. Depending orn the event type, the dispatcher will need to get in contact with the POLICE_DEPARTMENT, a HOSPITAL or FIRE STATION Each of these services will be identified by: i. Service id: A unique integer identifying the service(service_id) ii. X- Coordinate: a double used to store longitude(x coordinate) iii. Y- Coordinate: a double used to store latitude(y_coordinate) ir. Service Type: an enumerator to identify POLICE DEPARTMENT-0. HOSPITAL =1. FIRE STATION 2 (SERVICE_TYPE) City Name: A c-string (char *) to store the name of the city where the service is located v. C1 ame The information is given as an input file (named serviceInfo.txt) with a list like 215.4 178.4 385.4 215.4 123.5 123.5 76.5 255.5 PLANO PLANO PLANO RICHARDSON NOTE: The file serviceInfo.txt should be located at the same folder/directory as your .c file, and may include a header line (i.e. the name for each column) In the example above, the first entry (id 0), is telling us that at coordinates (215.4, 123.5), there is a POLICE DEPARTMENT (0) in the city of PLANO
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