CMPE 180A Data Structures and Algorithms in C++ Spring 2018

Similar documents
Free or Reduced Air from Select Gateways for 1st & 2nd guest on reservation

CMPE 180A Data Structures and Algorithms in C++ Spring 2018

CMPE 180A Data Structures and Algorithms in C++ Spring 2018

Figure 1 Map of US Coast Guard Districts... 2 Figure 2 CGD Zip File Size... 3 Figure 3 NOAA Zip File Size By State...

DEPARTMENT OF HOUSING AND URBAN DEVELOPMENT. [Docket No. FR-6090-N-01]

Presentation to NANC. January 22, 2003

IBM ServicePac Warranty Service Upgrade (WSU)

Increase uptime with a faster, more reliable, connection

CMPE Data Structures and Algorithms in C++ Spring 2018

Telecommunications and Internet Access By Schools & School Districts

Installation Instructions

Panelists. Patrick Michael. Darryl M. Bloodworth. Michael J. Zylstra. James C. Green

EZ-MAX Plus Quick Start Guide. EZ-MAX Plus 8, 16, & 24 Relay Panels Software Revision 1.0 and above.

Ocean Express Procedure: Quote and Bind Renewal Cargo

Post Graduation Survey Results 2015 College of Engineering Information Networking Institute INFORMATION NETWORKING Master of Science

A New Method of Using Polytomous Independent Variables with Many Levels for the Binary Outcome of Big Data Analysis

2018 NSP Student Leader Contact Form

CostQuest Associates, Inc.

Contents. 2 postal bulletin (6-4-09) Contents

IU Alumni Association Membership Statistics

CMPE 180A Data Structures and Algorithms in C++ Spring 2018 Instructor: Ron Mak

IU Alumni Association Membership Statistics

Fall 2007, Final Exam, Data Structures and Algorithms

Secure Destruction Service Overview and Update. Mailer Participation and Enrollment Requirements

Tina Ladabouche. GenCyber Program Manager

ACCESS PROCESS FOR CENTRAL OFFICE ACCESS

Department of Business and Information Technology College of Applied Science and Technology The University of Akron

The Lincoln National Life Insurance Company Universal Life Portfolio

CONNECTING NETWORKS, CONNECTING PEOPLE

NSA s Centers of Academic Excellence in Cyber Security

Presented on July 24, 2018

Oklahoma Economic Outlook 2017

Moonv6 Update NANOG 34

B.2 Measures of Central Tendency and Dispersion

Distracted Driving- A Review of Relevant Research and Latest Findings

Accommodating Broadband Infrastructure on Highway Rights-of-Way. Broadband Technology Opportunities Program (BTOP)

IT Modernization in State Government Drivers, Challenges and Successes. Bo Reese State Chief Information Officer, Oklahoma NASCIO President

2018 Supply Cheat Sheet MA/PDP/MAPD

Name: Business Name: Business Address: Street Address. Business Address: City ST Zip Code. Home Address: Street Address

State IT in Tough Times: Strategies and Trends for Cost Control and Efficiency

Best Practices in Rapid Deployment of PI Infrastructure and Integration with OEM Supplied SCADA Systems

CSE 781 Data Base Management Systems, Summer 09 ORACLE PROJECT

MERGING DATAFRAMES WITH PANDAS. Appending & concatenating Series

MAKING MONEY FROM YOUR UN-USED CALLS. Connecting People Already on the Phone with Political Polls and Research Surveys. Scott Richards CEO

Silicosis Prevalence Among Medicare Beneficiaries,

You must use this as your coversheet

1.0 Presenting a Mailing

HOMELAND SECURITY INFORMATION NETWORK. Information Analysis and Infrastructure Protection (IAIP)

THE LINEAR PROBABILITY MODEL: USING LEAST SQUARES TO ESTIMATE A REGRESSION EQUATION WITH A DICHOTOMOUS DEPENDENT VARIABLE

Charter EZPort User Guide

Global Forum 2007 Venice

Department of Homeland Security Customs and Border Protection. Center of Excellence and Expertise

ARE WE HEADED INTO A RECESSION?

AASHTO s National Transportation Product Evaluation Program

Team Members. When viewing this job aid electronically, click within the Contents to advance to desired page. Introduction... 2

Pastor. Financial Intake

The Altice Business. Carrier Advantage

OPEN FIELD NETWORK UNIT. NU Series

Job Opening Posting Title Location Description Portfolio Planning Manager AL-Birmingham Energy Project Manager AL-Birmingham

PulseNet Updates: Transitioning to WGS for Reference Testing and Surveillance

How to Make an Impressive Map of the United States with SAS/Graph for Beginners Sharon Avrunin-Becker, Westat, Rockville, MD

2013 Product Catalog. Quality, affordable tax preparation solutions for professionals Preparer s 1040 Bundle... $579

Awards Made for Solicitation

Prizm. manufactured by. White s Electronics, Inc Pleasant Valley Road Sweet Home, OR USA. Visit our site on the World Wide Web

DSC 201: Data Analysis & Visualization

Q THE NIELSEN LOCAL WATCH REPORT THE EVOLVING OVER-THE-AIR HOME. Copyright 2019 The Nielsen Company (US), LLC. All Rights Reserved.

Review of Alcoholic Beverage Outlet Camera Requirements in 50 Largest U.S. Cities and Comparison to Ordinance #32,107

Unit 9, Lesson 1: What Influences Temperature?

How to Order and Use Penalty Mail Stamps and Stationery

Contact Center Compliance Webinar Bringing you the ANSWERS you need about compliance in your call center.

Important Announcements

CMPE 180A Data Structures and Algorithms in C++

The Outlook for U.S. Manufacturing

A Capabilities Presentation

Water Resources Planning Models of Collaboration

2015 DISTRACTED DRIVING ENFORCEMENT APRIL 10-15, 2015

State HIE Strategic and Operational Plan Emerging Models. February 16, 2011

WINDSTREAM CARRIER ETHERNET: E-NNI Guide & ICB Processes

I. Training. Lancaster, PA Installation & Certification School Training Schedule Class Type of Class Date Class Size

Homework Assignment #5

CIS 467/602-01: Data Visualization

Medium voltage Marketing contacts

Sideseadmed (IRT0040) loeng 4/2012. Avo

2.76 Avg for View: 2.76 (0.30%)

SBC Investor Update. Merrill Lynch Global Communications Investor Conference March 16, 2004

Network Progress. Steve Cotter Rob Vietzke Network Services FMM 2006 / Chicago

Presentation Outline. Effective Survey Sampling of Rare Subgroups Probability-Based Sampling Using Split-Frames with Listed Households

National Fire Information Council Metro Program Managers

ASR Contact and Escalation Lists

The Intelligent Mail Barcode Tracking Mail Ballots

Energy Benchmarking Commercial Buildings. Cities that support or require energy benchmarking of commercial buildings

Expanding Transmission Capacity: Options and Implications. What role does renewable energy play in driving transmission expansion?

Appendix B-1: evs Mailer Application (as of 12/14/2016)

Empire Container Freight Station Inc Warehouse List

CenturyLink Satellite and Teleport Services

Configuring Oracle GoldenGate OGG 11gR2 local integrated capture and using OGG for mapping and transformations

DTFH61-13-C Addressing Challenges for Automation in Highway Construction

A Tool for Supporting Regional Optical Networks

Strengthening connections today, while building for tomorrow. Wireless broadband, small cells and 5G

INTRO REPORT? CHAPTERS 02 GREETING FROM NEMP PRESIDENT 02 FUTURE PLANS 03 MISSION & VISION 04 IMPORTANCE AT A GLANCE 06 NEMP NETWORK REPORT

Transcription:

San José State University Department of Computer Engineering CMPE 180A Data Structures and Algorithms in C++ Spring 2018 Instructor: Ron Mak Assignment 7 Assigned: Thursday, March 8 Due: Thursday, March 22 at 5:30 PM CodeCheck: http://codecheck.it/files/180312045951nql652nne06s1epyi0fdgpl Canvas: Assignment 7. U.S. Maps Points: 130 U.S. maps This assignment will give you practice writing a C++ application with a linked list and multiple classes. You will also further practice reading CSV files. The output of your program will be two printed maps: an outline of the continental United States and the same outline with major cities superimposed on it. You will complete four classes, Coordinate, City, Node, and SortedLinkedList. You are provided the complete source for main application, MapMaker.cpp. Input files Your program will read two CSV (comma-separated value) files as input data. Input file boundary-data.csv contains the geographic coordinates of locations along the border of the U.S. Each line of the file contains one coordinate consisting of two double values separated by a comma: Some example lines from the file: latitude,longitude 34.299084,-119.362617 29.47158,-83.302581 28.707351,-82.653682 32.342609,-114.426405 34.044824,-118.532846 1

The lines are not sorted in any particular order. Input file city-data.csv contains the names and states of major U.S. cities and their geographic coordinates. Each line of the file contains a city name, state abbreviation, and the latitude and longitude of the city s geographic coordinates, all separated by commas: A few lines from the file: name,state,latitude,longitude The lines are sorted in alphabetical order by city name. Input file boundary-data.csv: http://www.cs.sjsu.edu/~mak/cmpe180a/assignments/7/boundary-data.csv Input file city-data.csv: http://www.cs.sjsu.edu/~mak/cmpe180a/assignments/7/city-data.csv These input files are already uploaded to CodeCheck. Reading comma-separated values San Francisco,CA,37.775,-122.4183333 San Jose,CA,37.3394444,-121.8938889 Santa Fe,NM,35.6869444,-105.9372222 Savannah,GA,32.0833333,-81.1 Seattle,WA,47.6063889,-122.3308333 Your program must overload the input stream extraction operator >> to read the boundary and city CSV files. To read the comma-separated values, you can use the getline function. It has an optional parameter to specify a delimiter character, such as the comma. See http://www.cplusplus.com/reference/string/string/getline/ 2

U.S. boundary map Your program must first read input file border-data.csv to print this boundary map: ============= U.S. boundary ============= To generate the map, your program must read the file and create a Coordinate object from each input line. Class Coordinate must have a friend that overloads the input stream extraction operator >> to read each coordinate. Your program must create a Node object from each Coordinate object. The Node constructor must convert each coordinate to a print position. You are provided the Node member function convert_coordinate that maps a latitude to a row number and a longitude to a column number. 3

Your program must use a sorted linked list that is an instance of class SortedLinkedList. It must enter each Node object into the correct position of the linked list, which it must maintain sorted by row number and then by column number (similarly to the way you would sort a list of people s names by last name and then by first name). Once your program has read all the boundary coordinates, it should be able to iterate over the entire list and generate the boundary map. Class Node must have a friend that overloads the output stream insertion operator << to print each Node object, and class SortedLinkedList must have a friend that overloads the << operator to print the entire list. Class Node must also overload the > operator which SortedLinkedList::insert uses to compare two nodes when determining the correct insertion position for a new node. U.S. cities map Next, your program must input file city-data.csv to print this cities map: =========== U.S. Cities =========== *Grand Forks ND *Seattle WA *Great Falls MT *Missoula MT *Bismarck ND *Vancouver WA *Billings MT *Portland OR *Aberdeen SD *Salem OR *Saint Paul MN *Bangor ME *Green Bay WI *Colchester VT *Eugene OR *Rapid City SD *Rochester MN *Portland ME *Nampa ID*Idaho Falls ID *Sioux Falls SD *Rochester NY *Pocatello ID *Madison WI *Buffalo NY*Bennington VT *Ashland OR *Rockford IL*Warren MI *Worcester MA *Cedar Rapids IA*Toledo OH *Springfield MA *Laramie WY *Omaha NE *Davenport IA *Cleveland OH *Bridgeport CT *Eureka CA *West Valley City UT *Lincoln NE *Paterson NJ *Provo UT *Pittsburgh PA *Denver CO *Indianapolis IN *Wilmington DE *Parkersburg WV *Colorado Springs CO*Overland Park KS *Silver Spring MD *Sacramento CA *Louisville KY *San Francisco CA *Wichita KS *Evansville IN *San Jose CA *Springfield MO *Richmond VA *Norfolk VA *Las Vegas NV *Tulsa OK *Nashville TN *Paradise NV *Santa Fe NM *Fayetteville AR *Knoxville TN *Oklahoma City OK *Charlotte NC *Albuquerque NM *Little Rock AR *Los Angeles CA *Atlanta GA *Phoenix AZ *Birmingham AL *San Diego CA *Dallas TX *North Charleston SC *Tucson AZ *Shreveport LA *Montgomery AL *Savannah GA *Hattiesburg MS *Mobile AL *Austin TX *Baton Rouge LA *Jacksonville FL *New Orleans LA *San Antonio TX *Tampa FL *Miami FL 4

To generate the map, your program must read the file and create a City object from each input line. Class City must overload the input stream extraction operator >> to read each city. Your program must create a Node object from each City object. Again, the Node constructor must convert each coordinate to a print position. Enter each Node object created from a City object into the sorted linked list that you had created earlier with the boundary Coordinate objects. Continue to maintain the sort order by row and then by column. Your city Node objects will become interspersed with the boundary Node objects already in the list. Once your program has read all the city data, it should be able to iterate over the entire list and generate the cities map, which includes the boundary. The overloaded << operator of class Node must be able to output either a boundary node or a city node. Note that printing a city overrides printing the boundary. If multiple cities overlap in the same print row, printing the westernmost city has priority. Therefore, some cities may not be printed. CodeCheck will match each map against master copies. Destructors Your program must clean up after itself before it terminates by destroying all the objects that it had created. Submission into Canvas When you re satisfied with your program in CodeCheck, click the Download link at the very bottom of the Report screen to download a signed zip file of your solution. Submit this zip file into Canvas. You can submit as many times as you want until the deadline, and the number of submissions will not affect your score. Only your last submission will be graded. Submit the signed zip file from CodeCheck into Canvas: Assignment 7. U.S. Maps Note: You must submit the signed zip file that you download from CodeCheck, or your submission will not be graded. Do not rename the zip file. 5

Rubric Your program will be graded according to these criteria: Criteria Good output (as determined by CodeCheck) Boundary map Cities map Good program design Class Coordinate Class City Overloaded Node::operator > member function Overloaded operator << friend function for class Node Overloaded operator >> friend function for class Coordinate Overloaded operator >> friend function for class City SortedLinkedList::insert member function Overloaded operator << friend function for class SortedLinkedList Object cleanup Good program style Descriptive variable names and meaningful comments. Follow the coding style (formatting, braces, indentation, function declarations before the main, etc.) of the Savitch textbook. Max points 35 15 20 85 5 10 5 5 Academic integrity You may study together and discuss the assignments, but what you turn in must be your individual work. Assignment submissions will be checked for plagiarism using Moss (http://theory.stanford.edu/~aiken/moss/). Copying another student s program or sharing your program is a violation of academic integrity. Moss is not fooled by renaming variables, reformatting source code, or re-ordering functions. Violators of academic integrity will suffer severe sanctions, including academic probation. Students who are on academic probation are not eligible for work as instructional assistants in the university or for internships at local companies. 6