void Station::ResetAll() // post: For every Pump p in this station p.GallonsSold() is 0.0 { for (int k = 0; k < myPumps.length(); k++) myPumps[k].ResetGallonsSold(); } double Station::TotalSales() const // post: returns the total cash value of sales for all pumps { double total = 0; for (int k = 0; k < myPumps.length(); k++) if (k <= 1) total += myPumps[k].GallonsSold() * (myBasePrice + 0.25); else total += myPumps[k].GallonsSold() * myBasePrice; return total; } void Station::CloseStation(ostream & logFile) // pre: logFile is open and ready for writing // post: writes the total cash value of all gas sold for the day // to logFile; for every Pump p in this station p.GallonsSold() is 0.0 { logFile << TotalSales() << endl; ResetAll(); }