Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Blm 2 / 2 - Design Answer the rest of the questions using the following scenario. You have a software product, in which there exists

Blm 2 / 2 - Design

Answer the rest of the questions using the following scenario. 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."

Implement a client to test drive your design.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David M. Kroenke, David J. Auer

7th edition

133544621, 133544626, 0-13-354462-1, 978-0133544626

More Books

Students also viewed these Databases questions