Question: Assignment 2: Sorting and Searching ( Submission due date: 7 Jan 2021) 1. Identify attributes and member functions suitable for each case and draw the


Assignment 2: Sorting and Searching ( Submission due date: 7 Jan 2021) 1. Identify attributes and member functions suitable for each case and draw the class diagram. 2. Write implementation function for the member function and include constructor and destructor as well. a. Write main () program that will declare an array of the declared class and read information about the instance from a data file. b. Implement all member function through the element of the array. 3. Choose any sorting technique and searching technique. Sort the array based on certain key and perform searching based on certain criteria. The system must be used by 2 users and provide menu for the users. Use data file to get the data for your system. Example for a smartphone selling system: Shop owner Provide a menu for the shop owner that will allow him to choose the following: 1. Sort the phone based on the phone model 2. Order phone-this function will search for the stock that are less than 10 item in stock and shop owner will add new stock. 3. Receive stock-update information for the stock that has just been added to the stock. 4. Print detail information for a phone. Customer Provide a menu for the customer that will allow him to choose the following: 1. Search information for handphone based on the following categories: a. model b. feature c. price 2. Buy the phone 3. Get receipt-System provide receipt for the customer, which consists of customer's name, Provide a menu for the shop owner that will allow him to choose the following: 1. Sort the phone based on the phone model 2. Order phone-this function will search for the stock that are less than 10 item in stock and shop owner will add new stock. 3. Receive stock-update information for the stock that has just been added to the stock. 4. Print detail information for a phone. Customer Provide a menu for the customer that will allow him to choose the following: 1. Search information for handphone based on the following categories: a. model b. feature c. price 2. Buy the phone 3. Get receipt-System provide receipt for the customer, which consists of customer's name, model, features and price for the phone bought by the customer. Deliverables: 1. Source code in CH (.cpp) 2. Data file used 3. Report( in Word doc) consists of: a. Group member's task allocation b. Class diagram of the system c. Source code documentation (source code with comments) d. Explanation of the sorting/searching/list techniques used Screenshot of the output Submission is through the link provided in E-learning. e
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
