Question: Modified Programming Challenge # 1 0 ( page 9 3 8 ) with Test Cases and file reading. Implement the DivSales class that holds sales

Modified Programming Challenge #10(page 938) with Test Cases and file reading. Implement the DivSales class that holds sales data for a division, with the array for the sales data by quarter, and a private static variable that holds the total sales for all sales divisions. Do not ask the user to enter the sales data. The program will create the array of six objects, and read the sales data below into the objects from a file called SalesFile.txt. The program will then prompt the user for the division number (16) and output the sales for that division, and the total sales for that division as shown below. Use functions as you see fit. No input validation is required. Add a loop in main (do not use while(true), while(1), break or continue) so that multiple numbers can be input and 0 to quit. When the user enters 0 to quit, output the total sales for the corporation (the private static variable value). The program will use the class definition provided below in a separate *.h file, and use the class member functions to obtain the proper output (including the private static variable). Do not change the class. // Declaration of the DivSales class for the *.h file class DivSales { private: static double corpSales; double divSales; public: double qtrs[4]; void setDivSales(double s){ divSales = divSales + s; } void setCorpSales(double s){ corpSales = corpSales + s; } double getDivSales() const { return divSales; } double getCorpSales() const { return corpSales; }}; // Static member variable definition double DivSales::corpSales; Output Format tabs and spacing required: Date for "SalesFile.txt"1150.011151.021152.031153.041250.051251.061252.071253.081350.091351.101352.111353.121450.131451.141452.151453.161550.171551.181552.191553.201650.211651.221652.231653.24 I need help in using visual basic for C++

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!