Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please help thank you! main class-> color class-> Part 2 idd a LineWidthOp class, and integrate into simulation Add a new capability to change line

please help thank you!

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

main class->image text in transcribed

color class->image text in transcribed

Part 2 idd a LineWidthOp class, and integrate into simulation Add a new capability to change line widths. 1. Add a new class called LineWidth Op to the operationundo package. To do this, rightclick on the ColorOp.java class and select Refactor->Copy. In the dialog box that comes up, rename the copy to LineWidthOp then click Refactor: 2. In the new class's code, replace the String colName property with an int lineWidth property. Change the constructor and the toString method to reflect this. 3. In the simulation, modify the createNewOp method so that there are three more switch cases for lineWidths of 1,2,5. Make sure to change the number in the first statement of the method so that these new ops have a chance to be created. 4. Run the simulation and make sure that you are seeing shape drawing, color changes and line width changes. When you are finished, submit LineWidthOp.java to Canvas. package operationundo

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

Step: 3

blur-text-image

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

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2015 Porto Portugal September 7 11 2015 Proceedings Part 3 Lnai 9286

Authors: Albert Bifet ,Michael May ,Bianca Zadrozny ,Ricard Gavalda ,Dino Pedreschi ,Francesco Bonchi ,Jaime Cardoso ,Myra Spiliopoulou

1st Edition

3319234609, 978-3319234601

Students also viewed these Databases questions

Question

Define and measure service productivity.

Answered: 1 week ago