Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program in C++ that will take information in from a file and return and manipulate the data. Restrictions: No using string library (must

Write a program in C++ that will take information in from a file and return and manipulate the data.

Restrictions: No using string library (must use char arrays while working with strings), No using vectors

Use a do while loop to continuously show a menu with four different options

Option 1 will ask the user for a file and read in the file that they specify.

The file that you read in will mirror the example format shown below

---------------------------

Enterprise 94786

2012 Toyota Camry 16.0 120.36 {gps} 1

2014 Honda Civic 28.3 89.54 {camera lidar} 0 Mitch

2006 Ford Fiesta 14.3 78.23 {} 0 Mary

2013 Ford Explorer 21 94.56 {camera lidar radar} 1

2009 Dodge Viper 20.1 78.4 {lidar} 0 Phil

---------------------------

The first line of the file will be the car agency name and zip code

the rest of the lines show the data of each individual car

the following data is given for each car: car year, car make, car model, car tank size, price, {sensors}, availability(0 meaning available 1 meaning unavailable), and lessee

The sensors are within {} and can have 0 up to 3 seperated names

the lessee name will be there only if the car is available

Option 2 will print out the data in the file

Option 3 find and print out the most expensive available car

Option 4 exit the proram

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

More Books

Students also viewed these Databases questions