3.1 Task One: Program 10-12 (Page 637-638). (40 marks) (1)Input source code and compile it. Run the program and capture

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

3.1 Task One: Program 10-12 (Page 637-638). (40 marks) (1)Input source code and compile it. Run the program and capture

Post by answerhappygod »

3 1 Task One Program 10 12 Page 637 638 40 Marks 1 Input Source Code And Compile It Run The Program And Capture 1
3 1 Task One Program 10 12 Page 637 638 40 Marks 1 Input Source Code And Compile It Run The Program And Capture 1 (53.59 KiB) Viewed 41 times
3.1 Task One: Program 10-12 (Page 637-638). (40 marks) (1)Input source code and compile it. Run the program and capture screenshots of output. (20 marks) (2)Modify the program. Design and Encapsulate the data and functions in class Sales. Add two more member functions in this class to find The highest sales and The lowest sales. (20 marks) 19 class Sales private: int types; double array, public: //Function prototype Sales(int); -Sales(); void getSales(); double totalSales(); double highest Sale(); double lowest Sale(); }; Sales::Sales(int num) types num; array=new doubleſ types) or int main() { const int QUARTERS - 14://constant value can be changed Sales shop (QUARTERS); 1/optional method to implemenet getSale: // or getsale can be overloaded with different formal paramere(s) //(1) ask user to input from keyboard or //(2) read from data file //(3)send an exiting array to shop object 1.- shop.getSales(); // cout << setprecision(2); cout << fixed << showpoint; cout << "The total sales for the year are $"; cout <<shop. totalSales() << endl; cout << "The highest sale in the year is $"; cout <<shop. highest Sale() << endl; cout << "The lowest sale in the year is $"; cout <cshop. lowest Sale() << endl; (3)Run the program and capture screensho of output in report.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply