Please write this project in C. the source file inputs: 4 4 5 3 1 11 23
Fantastic news! We've Found the answer you've been seeking!
Question:
Please write this project in C.
the source file inputs:
4 4 5 3 1 11 23 34 42 41240 0 0 0
Transcribed Image Text:
In this project you will write a C program that, given an input file that contains: a grid size (representing blocks in a neighborhood), coordinates of bakery-cafe locations, and customer survey responses; generates as output, a file with the maximum number of locations that can be accessed for each given survey response and the optimal coordinate from which a person can access them. Overview: The Sunrise bakery-cafe chain has several locations in different parts of the far, far away city. City folks love coffee and donuts from Sunrise , so the local "kitties in booties" real estate company is interested in identifying landmarks that represent a good deal to build rental apartments that is based on proximity to Sunrise locations in the neighborhood. To perform the valuation analysis, a map of the neighborhood marked with Sunrise locations is used. Assuming the average person is willing to walk a certain number of blocks to get their morning coffee, you need to find the coordinates from which a person can access the maximum number of Sunrise locations. A map has a grid layout (matrix), with blocks aligned on the north- south and east-west axes. Since we need to walk through the streets to reach a location, the distance between the intersections (a,b) and (c,d) is given by the equation: |ac| + |b d\. Instructions: The source file for this assignment will be named p2_ _ .c When you run your program, you will enter the input filename on the command line as follows: p2_ _ Input: Each input file could contain several test cases. The first line of each test case contains four integers dx, dy, n, r. These values represent: the dimensions of the grid dxxdy, (1 In this project you will write a C program that, given an input file that contains: a grid size (representing blocks in a neighborhood), coordinates of bakery-cafe locations, and customer survey responses; generates as output, a file with the maximum number of locations that can be accessed for each given survey response and the optimal coordinate from which a person can access them. Overview: The Sunrise bakery-cafe chain has several locations in different parts of the far, far away city. City folks love coffee and donuts from Sunrise , so the local "kitties in booties" real estate company is interested in identifying landmarks that represent a good deal to build rental apartments that is based on proximity to Sunrise locations in the neighborhood. To perform the valuation analysis, a map of the neighborhood marked with Sunrise locations is used. Assuming the average person is willing to walk a certain number of blocks to get their morning coffee, you need to find the coordinates from which a person can access the maximum number of Sunrise locations. A map has a grid layout (matrix), with blocks aligned on the north- south and east-west axes. Since we need to walk through the streets to reach a location, the distance between the intersections (a,b) and (c,d) is given by the equation: |ac| + |b d\. Instructions: The source file for this assignment will be named p2_ _ .c When you run your program, you will enter the input filename on the command line as follows: p2_ _ Input: Each input file could contain several test cases. The first line of each test case contains four integers dx, dy, n, r. These values represent: the dimensions of the grid dxxdy, (1
Expert Answer:
Posted Date:
Students also viewed these programming questions
-
1. (9 pts) Consider a supply chain with a manufacturer and a retailer. The product is offered for a single season. Suppose the manufacturer produces at a cost of $30/unit. The manufacturer sells to...
-
Describe (a) the similarities and (b) the differences between the bulk deformation processes described in Chapter 6 and the sheet-metal forming processes described in this chapter.
-
Explain why some overhead costs in a traditional factory become direct costs in a JIT factory.
-
Comparing Performance Evaluation Methods Top management of the Gates Corporation is trying to construct a performance evaluation system to use to evaluate each of its three divisions. This past...
-
Suppose the U.S. supply and demand curves for automobiles cross at a price of $15,000 but (identical) automobiles can be purchased from abroad for $10,000. Now suppose the government offers a subsidy...
-
. Problem 1 Pullman Inc completed Job 2525 on May 31, and there were no jobs in process in the plant. Prior to June 1, the predetermined overhead application rate for June was computed from the...
-
1. What is the Authors advice to Flayton Electronics? 2. What effect, is any, does the Authors job have on his perspective and/or advice? 3. Is this good advice? Why or why not? If you were to change...
-
Sardo Ltd. is a CCPC and is not associated with any other corporation. Its 2023 net income is $422,000 and is made up of the following components: Active Business Income Taxable Dividends Foreign...
-
How would you assess the assistant principal's actions? Is his action justified? Why or why not? Support your opinions with court cases from the text. Does the child with a disability have a valid...
-
A particle travels according to the velocity function shown below. Find the displacement of the particle on the time interval [0,4]. -2t-1 if 0
-
Write a class definition for the following scenario. You have to write a class called MyFraction which works on fractions of the form a/b where a represents the numerator and b represents the...
-
#9 (9) Approximate the integral by a Riemann sum with n = 4. dx. Use right hand endpoints. T (10) Evaluate f sin (x) cos(x)dx. (11) Evaluate f (2x3 + x + 2)dx. (12) Evaluate x(2+x)2dx. 2x2 dx (13)...
-
Create a view named PART ORDER. It consists of the part number, description, price, order number, order date, number ordered, and quoted price for all order lines currently on file. a. Write and...
-
Fred Farmer needs to prepare a balance sheet for his bank. He spent the day getting the following information. Fred needs your help to build a balance sheet and evaluate it. The information was...
-
Determine if 1,034 is prime or composite
-
Find the prime factorization of 140 .
-
How many different prime factors does 10,241 have?
Study smarter with the SolutionInn App