#include #include #include using namespace std; class Price { public: double wholesale, retail; }; class Car { public: string make, model; Price price; void print() { cout << "Make: " << make << endl; cout << "Model: " << model << endl; cout << "Wholesale price: $" << price.wholesale << endl; cout << "Retail price: $" << price.retail << endl; cout << "Profit: $" << price.retail-price.wholesale << endl; } }; int main() { ifstream data("cars.txt"); string item; int i=0; Car cars[10]; while(!data.eof()) { // Get Make getline(data,item,';'); cars[i].make=item; // Get Model getline(data,item,';'); cars[i].model=item; // Get Wholesale getline(data,item,';'); // Convert to a float (double). cars[i].price.wholesale=atof(item.c_str()); // Get Retail getline(data,item); // Convert to a float (double). cars[i].price.retail=atof(item.c_str()); i++; cout << "Car Done" << endl; } cout << endl; for (int car=0;car