Q1. C++ code is required. Use cin and cout. No design is required.
Write a program to:
(a). Create an array of doubles.
Assume this is an array of sales for 12 Departments in a store.
Load this Array from a file at the start of the program. Use a function and pass in the array and file name.
(b). Use a menu to allow display and update of this array.
Allow access to the departments array via a menu.
The main menu, which should be called from main(),
should have these options:
1. Display the sales for a selected Department.
2. Display the sales for all Departments.
3. Display the average of sales for all the Departments.
4. Display the Highest sales for all Departments.
5. Change the sales for a Department. Request the Department number.
Design your program using modules, which must be:
"Highly Cohesive" - each module performs one task.
"Loosely Coupled" - pass parameters across to modules if possible.
All the options should call a funtion. Pass the Array and array size to the function
Unfortunately, your question requires a lot of work and cannot be done for free. Submit it with all requirements as an assignment to our control panel and we'll assist you.