Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

hello, please make a c++ coding file for this question. please use basic coding skills as possible with comments. it would be great if you

hello, please make a c++ coding file for this question. please use basic coding skills as possible with comments. it would be great if you could do data abstraction, input, output, process and assumptions.

image text in transcribed

Program 11 "GPS" Write a C+program that will process a stream of GPS data. Each line of data starts with a command, followed by the data for that command. There will be one command per line Your program should 1. Ask the user for the name of a data file echo print the file name 2. Open the data file 1. if the file fails to open, return to step1 3. Skip the first two lines of the data file 4. Process each command in the data file 5. Report the following to both the screen (cout) and a file named GPS.report: 1. Final Location 2. Total distance traveled (rounded to one decimal place) 3. Distance to starting point (rounded to one decimal place) Commands START indicates the starting location of the trip STOP -indicates the ending location of the trip DATA - indicates a turning point. Assume 1. All coordinates are in a two dimension cartesian coordinate plane 2. All numerical output should be rounded to 1 decimal places Sample Input GPS Data File Command x-coordinate y-coordinate START 0 0 DATA 24 24 DATA 4 24 DATA 4 124 DATA-25 12 DATA 0 0 STOP 195 215 Sample Output Please Enter The Name Of The Data File: data.txt Final Location: (195.0, 215.0) Total distance traveled 587.6 iDistance to starting point 290.3

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Put Your Data To Work 52 Tips And Techniques For Effectively Managing Your Database

Authors: Wes Trochlil

1st Edition

0880343079, 978-0880343077

More Books

Students also viewed these Databases questions

Question

Discuss the history of human resource management (HRM).

Answered: 1 week ago