[Solved] CS2134-Homework 4B- Enter data from the file MTA_train_stop_data.txt

$25

File Name: CS2134-Homework_4B-_Enter_data_from_the_file_MTA_train_stop_data.txt.zip
File Size: 640.56 KB

SKU: [Solved] CS2134-Homework 4B- Enter data from the file MTA_train_stop_data.txt Category: Tag:
5/5 - (1 vote)

Assignment 4b

Programming Part:1. Enter data from the file MTA_train_stop_data.txt. The data from this assignment is from http://www.mta.info/developers/download.html. (Please note that we will only be using some of the information in this file for this assignment. )In the batch phase you will read all the data from the file called MTA_train_stop_data.txt into a container of type vector.Your program will define the class trainStopData. It has the following private member variables :string stop_id; // id of train stop (1st token) string stop_name; // name of station (4th token) double stop_lat; // latitude of train stop location double stop_lon; // longitude of train stop locationYour class should also have a constructor and the following public member functions:string get_id( ) const string get_stop_name( ) const double get_latitude( ) const double get_longitude( ) const12. In this question you will write the code to determine if a vector contains duplicate items. Your function will return true if there are duplicates and false otherwise. You will solve this problem in four ways (i.e. you will write four functions).(a) Use the list class to help you find the duplicates. (Use a brute force technique by comparing all items with each other.)(b) Use the STL sort algorithm, and the vector class to help you find the duplicates(c) Use the set class to help you find duplicates(d) Use the unordered set class to help you find duplicatesWritten Part1. In programming question 2, what are the average case and the worst case running times for each of the different ways you used to find duplicates? Write your answers using big-Oh notation.

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] CS2134-Homework 4B- Enter data from the file MTA_train_stop_data.txt
$25