Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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_2

Step: 3

blur-text-image_3

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

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2014 Nancy France September 15 19 2014 Proceedings Part 3 Lnai 8726

Authors: Toon Calders ,Floriana Esposito ,Eyke Hullermeier ,Rosa Meo

2014th Edition

3662448440, 978-3662448441

More Books

Students also viewed these Databases questions