c++ programming construct a class named car containing three data members: a dou
ID: 3645504 • Letter: C
Question
c++ programming construct a class named car containing three data members: a double precision variable named enginesize, a character variable named bodystyle and an integer variable named colorcode. the member functions should include a constructor that provides default values of 0 for each numeric data member and an x for each character variable; a display function that prints the engine size, body style and color code; and an assignment operator that performs a memberwise assignment between two Car objects for each instance variable. b. Include the class written for Exercise above that creats and displays two Car bojects; the second object is assigned to values of the first objectExplanation / Answer
#include #include #include using namespace std; class car{ double enginesize; char bodystyle; int colorcode; //Constructor car() { this.enginesize = 0.0; this.bodystyle = 'x'; this.colorcode = 5; } void display() { coutRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.