Question: Question 1. [5 marks] Using the example of the Trip Planning Software discussed in class suppose that the PlanningService class needs to sort trips using
![Question 1. [5 marks] Using the example of the Trip Planning](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f1125edbe5f_91066f1125e7a337.jpg)
Question 1. [5 marks] Using the example of the Trip Planning Software discussed in class suppose that the PlanningService class needs to sort trips using one of the following algorithms: bubble sort, heap sort, or quick sort. The selection of an algorithm will depend on the context in which the collection of trips is used: sometimes a bubble sort should be used, sometimes a heap sort, etc. Which design pattern would you use to allow for the selection of any of these sorting algorithms at run time, and for the possibility of adding new such algorithms in future releases? Once you have selected an appropriate design pattern, justify your choice by listing the needs of the problem that correspond to the intent of the pattern. You are also asked to show in a class diagram how the use of the pattern would look like
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
