With the new one-parameter constructor that takes the size of the turtle, we can modify the instantiation of the turtles. In the Gui class in the edu.westga.cs1301.project1.view package. Do the following: In the Gui constructor, for the instantiation of the first turtle replace the call to the DoodleTurtle default constructor with a call to the one-parameter constructor and pass in a size of 30. Do the same for the second turtle but give it a size of 15.
- With the new one-parameter constructor that takes the size of the turtle, we can modify the instantiation of the turtles. In the Gui class in the edu.westga.cs1301.project1.view package. Do the following:
- In the Gui constructor, for the instantiation of the first turtle replace the call to the DoodleTurtle default constructor with a call to the one-parameter constructor and pass in a size of 30.
Do the same for the second turtle but give it a size of 15.
public class Gui extends GraphicsProgram {
public static final int APPLICATION_WIDTH = 900;
public static final int APPLICATION_HEIGHT = 900;
private static final long serialVersionUID = 1L;
private DoodleController sketchPad;
private StatisticsController statsController;
private DoodleTurtle turtle1;
private DoodleTurtle turtle2;
/**
* Constructs and initializes the GUI.
*
* @precondition none
* @postcondition none
*/
public Gui() {
this.turtle1 = new DoodleTurtle();
this.turtle2 = new DoodleTurtle();
this.sketchPad = new DoodleController(this.turtle1, this.turtle2);
this.statsController = new StatisticsController(this.turtle1, this.turtle2);
}
![](/static/compass_v2/shared-icons/check-mark.png)
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
I have tried this however, I am getting an error. What do I do?
![290
30
31
32
33
34
350
x36
x37
38
39
40
41
420
43
44
45
46
* Constructs and initializes the GUI.
*
*
*
@precondition none
@postcondition none
public Gui() {
this.turtle1 = new DoodleTurtle (30);
this.turtle2 = new Doodle Turtle (15);
this.sketchPad = new DoodleController(this.turtlel, this.turtle2);
this.statsController = new StatisticsController(this.turtlel, this.turtle2);
/**
* Initializes the application.
*
E
* @precondition none
@postcondition none](https://content.bartleby.com/qna-images/question/606d62c4-a57c-45fa-abf8-b9d3616e3998/afafefed-c83b-4493-8b19-aa73e8b88906/ejt3ci_thumbnail.png)
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
![Concepts of Database Management](https://www.bartleby.com/isbn_cover_images/9781337093422/9781337093422_smallCoverImage.gif)
![Prelude to Programming](https://www.bartleby.com/isbn_cover_images/9780133750423/9780133750423_smallCoverImage.jpg)
![Sc Business Data Communications and Networking, T…](https://www.bartleby.com/isbn_cover_images/9781119368830/9781119368830_smallCoverImage.gif)