Computers and Technology
Design and implement the Heap.h header using the given Heap class below: template class Heap public: Heap(); Heap(const T elements[], int arraySize); // Remove the root from the heap and maintain the heap propertyT remove() throw (runtime_error); // Insert element into the heap and maintain the heap property void add(const T& element); // Get the number of element in the heap int getSize() const;private: vector v; Removing the root in a heap - after the root is removed, the tree must be rebuilt to maintain the heap property: Move the last node to replace the root; Let the root be the current node; While (the current node has children and the current node is smaller than one of its children) Swap the current node with the larger of its children; The current node now is one level down;} Adding a new node - to add a new node to the heap, first add it to the end of the heap and then rebuild the tree as follows: Let the last node be the current node; While (the current node is greater than its parent) {Swap the current node with its parent; The current node now is one level up:} To test the header file, write the heapSort function and use the following main program: #include #include "Heap.h" using namespace std; template void heapSort(T list[], int arraySize) 1/ your code here .. pint main() const int SIZE = 9; int list[] = { 1, 2, 3, 4, 9, 11, 3, 1, 2 }; heapSort(list, SIZE); cout
*URGENT!!* *100 POINTS!**9 questions for 100 points*You are the operator of a small golf and ski shop (Sams Golf & Ski) that generates a profit of $70,000 on sales of $255,000 per year. You have been very successful with your 3-year-old business and have met all of your obligations on a timely basis. Your ultimate goal has been to rename your business Sams Sports Emporium (SSE) and carry most of the popular recreational sports items at multiple outlets within your state. You have been working on a business plan to present to the bank in order to secure funding and make your dream a reality. As part of your business plan, you need to address the information needs of your proposed business.2.) identify the IS components needed for SSE. When you explain them, use terms SSE would use.Hint: What types of communication technology, software, hardware, data procedures, and people?3.) how would perform an Industry Analysis on the sporting goods industry as a whole?Hint: Use Porters Five Forces to guide you.4.) what competitive strategy you would use for SSE based on the Industry Analysis you write wrote about in #2.5.)discuss systems needed for SSE. Hint: EES for accounting, etc.6.) identify the databases needed for SSE and explain why they are needed.Hint: What type of DBMS? What kind of information would you keep in your database?7.)identifying the methodology to use for developing the system(s) for SSE and justify your selection.Hint: Prototyping8.) what type of system (functional or cross-functional) is needed and explain.Hint: Supply chain management, sales transactions updates, etc.9.)that states what your company ethics policy is. Hint: What would you include in your companys ethics policy?
Write a class called DisArray with methods to convert a 1-dimensional array to a 2-dimensional array. The methods' name should be convert2D. You should create methods to convert int[] and String[], that can be tested against the following class. Your convert2D methods should choose the closest possible square-ish size for the 2D array. For example, if your input array is [10], its 2D conversion should be [3][4] or [4][3] -- you decide if you want to favor rows over columns. Your method should place the elements of the one-dimensional array into the two-dimensional array in row-major order, and fill the remaining elements with 0 (for integer arrays) or null (for String arrays). The process of filling unused elements with 0 or null is called padding. If the input array's length is a perfect square, e.g., [16], then your output should a square array, i.e., [4][4]. For any other size, your objective is to minimize the number of padded elements. For example, if your input is [10] you should opt for a [3][4] array instead of a [4][4]. The former will have only 2 padded elements; the latter 6.