Question: Write a C++ program that defines a Car class data type. The Car class should have the following attributes: - make: A string representing the
Write a C++ program that defines a Car class data type. The Car class should have the following attributes: - make: A string representing the make of the car. - model: A string representing the model of the car. - year: An integer representing the manufacturing year of the car. The Car class should have the following member functions: 1. A parameterized constructor that initializes the make, model, and year attributes when an object of the Car class is created. 2. A member function displaylnfo() that displays the values of the make, model, and year attributes. 3. A destructor that displays a message when a Car object is destroyed. In your program, create two Car objects with different attributes and demonstrate the of constructors and destructors. Ensure that the program displays a message when eac
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
