Question

C++ I realize that some cities have more outages than the number of customers (!) --...

C++

I realize that some cities have more outages than the number of customers (!) -- yes the data is not very accurate, but this is the real data with which LIPA operated in the aftermath of the storm (!).   

You job is to write a program that reads this data file and allows users to query and create reports.  

Here are the features of your program:  

1- Query City:   Given a city name, provide the corresponding information -- number of customers without power and total number of customers in that city.   
2- City With Most Outage:   Return the city with the most percentage of customers without power. That is the customers without power divided by total number of customers.   
0- Exit  

Make sure that you create a class called     City. This class will have three fields:     Name,     NumOfOutages,     TotalCust. You will read the whole data file at the very beginning of the program into an array of type     City. You may name this array     Data.   

Based on this     Data array, you will write two functions     QueryCity() and     CityWithMostOutage(). These functions will be called from the     main() function based on user's choice.

ATLANTICBEACH 2412 2022
BALDWIN 1509 8740
BALDWINHARBOR 60 2817
BELLEROSE 99 1266
BELLMORE 504 6342
CEDARHURST 493 3175
EASTMEADOW 2826 13026
EASTROCKAWAY 447 4494
ELMONT 1582 9639
FRANKLINSQUARE 2318 10502
GARDENCITY 1836 8448
GARDENCITYSOUTH 273 1611
HEMPSTEAD 1065 17041
HEWLETT 132 3016
HEWLETTBAYPARK 0 444
HEWLETTHARBOR 17 577
HEWLETTNECK 20 168
INWOOD 152 3485
ISLANDPARK 451 3572
LAKEVIEW 259 1503
LAWRENCE 309 2557
LEVITTOWN 4338 17370
LIDOBEACH 1 3037
LONGBEACH 0 15283

0 0
Add a comment Improve this question Transcribed image text
Request Professional Answer

Request Answer!

We need at least 10 more requests to produce the answer.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the answer will be notified once they are available.
Know the answer?
Add Answer to:
C++ I realize that some cities have more outages than the number of customers (!) --...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT