Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

https://www.dropbox.com/s/laqx5hbrvmlzc39/Screen%2520Shot%25202016-01-25%2520at%

ID: 3695553 • Letter: H

Question

https://www.dropbox.com/s/laqx5hbrvmlzc39/Screen%2520Shot%25202016-01-25%2520at%25203_56_56%2520PM.png?dl=0

Write a program that will print out a directory listing of the top 5 cities - New York, Los Angeles, Chicago, Houston and Philadelphia - in a tabular format as shown below (no row or column separators needed) with the following caveats:

The first 8 of the 9 columns of data should be shown, i.e. you can skip the location column.

For the state column, two letter abbreviations should be used.

For the area and density, you are allowed to only use the data for square miles.

Follow the formatting rules (using iomanip) shown in class.

Make sure your data is aligned well and has enough separation.

Ensure you do not have more than 80 columns of data per row, or it will wrap to following lines.

This lab is the second of two parts and worth 5 points. Remember to include the necessary comment block at the top of the code.

I use microsoft visual studio 2013 (C++)

Explanation / Answer

sing System; using System.ComponentModel; namespace Codesqueeze.Entities { public enum State { [Description("Alabama")] AL, [Description("Alaska")] AK, [Description("Arkansas")] AR, [Description("Arizona")] AZ, [Description("California")] CA, [Description("Colorado")] CO, [Description("Connecticut")] CT, [Description("D.C.")] DC, [Description("Delaware")] DE, [Description("Florida")] FL, [Description("Georgia")] GA, [Description("Hawaii")] HI, [Description("Iowa")] IA, [Description("Idaho")] ID, [Description("Illinois")] IL, [Description("Indiana")] IN, [Description("Kansas")] KS, [Description("Kentucky")] KY, [Description("Louisiana")] LA, [Description("Massachusetts")] MA, [Description("Maryland")] MD, [Description("Maine")] ME, [Description("Michigan")] MI, [Description("Minnesota")] MN, [Description("Missouri")] MO, [Description("Mississippi")] MS, [Description("Montana")] MT, [Description("North Carolina")] NC, [Description("North Dakota")] ND, [Description("Nebraska")] NE, [Description("New Hampshire")] NH, [Description("New Jersey")] NJ, [Description("New Mexico")] NM, [Description("Nevada")] NV, [Description("New York")] NY, [Description("Oklahoma")] OK, [Description("Ohio")] OH, [Description("Oregon")] OR, [Description("Pennsylvania")] PA, [Description("Rhode Island")] RI, [Description("South Carolina")] SC, [Description("South Dakota")] SD, [Description("Tennessee")] TN, [Description("Texas")] TX, [Description("Utah")] UT, [Description("Virginia")] VA, [Description("Vermont")] VT, [Description("Washington")] WA, [Description("Wisconsin")] WI, [Description("West Virginia")] WV, [Description("Wyoming")] WY } }