You have a software product, in which there exists a number of Customers objects that contain a
Question:
You have a software product, in which there exists a number of Customers objects that contain a collection of customers. Some examples of these collections can be YoungCustomers, MiddleAgedCustomers etc. that contain a collection of customers that belong to a certain group.
Client code may need to sort these collection objects according to the last names of the customers. One specific requirement is any particular collection can be sorted using a specific sort algortim. Moreover, this sort algorithm can be changed later for any collection. As an example, assuming that in this system we have BubbleSort, QuickSort and MergeSort; if a particular collection such as YoungCustomers is initially designed to be sorted using BubbleSort, at a later time it should be possible for YoungCustomers to switch to QuickSort instead.
Your task is to select a design pattern suitable for this scenario and implement a design.
In this scenario, focus only on the software design instead of the function. Therefore, do not try to implement the actual sort algorithms. It is enough for your sort procedures to just display a message along the lines of "collection is sorted using xyz algorithm."
Justify (explain why) your design pattern selection.
Managerial accounting
ISBN: 978-0471467854
1st edition
Authors: ramji balakrishnan, k. s i varamakrishnan, Geoffrey b. sprin