Question: C++ You are to write a class called Car. The car has the following private variables Make Model Year Cylinders You are to write the

C++

You are to write a class called Car. The car has the following private variables

  • Make
  • Model
  • Year
  • Cylinders

You are to write the Constructor (default and the full one) and the functions for this class.

In the main, you are going to input (from a file called "cars.txt") all the cars and place them in an array of Car objects you make in the main.

You should then be able to display all the information correctly on the screen from the Objects.

Your program should then be able to search the array for a specific car based on the choice between: Make, Model, Year or number of Cylinders.

Display the items retrieved by the search on the screen.

cars.txt

Volkswagen Jetta 2016 4 Jeep Wrangler 2008 6 Toyota Corolla 1999 4 Chevy Malibu 2018 6 Chevy Malibu 2014 6 BMW 320i 2014 6 Jeep GrandCharokeeLaredo 2006 6 Ford Fusion 2012 4 Chevy Equinox 2015 4 Volkswagen Jetta 1998 4

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!