Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Sketch the UML diagram for the existing code. (It is going to be simple!) 2. Now refactor the solution to use the strategy pattern.

1. Sketch the UML diagram for the existing code. (It is going to be simple!)
2. Now refactor the solution to use the strategy pattern. Show your new UML class diagram here.
3. Mark up the code the show how you would refactor it to implement the strategy pattern.
image text in transcribed
SE 350: Worksheet # O What de The code class varial If datatype If datatype If datatype If datatype import javautil, LinkedList; public class SortMyDataf LinkedList myList int minSize; int status int dataType: public SortMyData(int status, int dataType) mylist- new LinkedList0: this.status status; this.dataType-dataType; e What cha sorting rout No major ch shorting rou and if requir condition wh called. used in readData(myList); if (dataType =+1)( if(status1 sortX(myList): else if (status2 sortY(mylist); } else if (status =-31 sortZImylist) e) what chan sorting routin Before remov that the victin dependency n else I doe sortx(myList); 4 Sketch the going to be sin public void readData(LinkedList list)H // Read in data here public void sortx(LinkedList myList) Show all [Page 1 of 2

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

Lab Manual For Database Development

Authors: Rachelle Reese

1st Custom Edition

1256741736, 978-1256741732

More Books

Students also viewed these Databases questions

Question

Explain how cultural differences affect business communication.

Answered: 1 week ago

Question

List and explain the goals of business communication.

Answered: 1 week ago