The data member based on the information about the dealership stores is illustrated below.
Data members are the members that are declared with any of the fundamental types like the pointer, reference, array types, and user-defined types.
The data members and necessary constructor declaration will be:
class Car{
public :
string m_make ;
string m_model;
double m_earnedOnCar;
//Added data member for the car dealership
Car* m_dealerShip;
public :
Car(string str1,string str2){
this->m_make=str1;
this->m_model=str2;
}
//Address constructor to add the dealership to the car
Car(Car* car){
this->m_dealerShip=car;
}
//copy constructor to copy dealership of the car
Car(const Car &car) {
this->m_dealerShip=car.m_dealerShip;
}
//add method to add the dealership of the car
void add(Car* car){
this->m_dealerShip=car;
}
double getAmmountEarnedOnCar(){
return this->m_earnedOnCar;
}
Learn more about data on:
https://brainly.com/question/4219149
#SPJ1