Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

help please! will rate! Java programming. 1. Choose one of the Castle Outline options. Castle Outline - Option A Castle Outline - Option B Castle

help please! will rate!
image text in transcribed
image text in transcribed
Java programming.
1. Choose one of the Castle Outline options. Castle Outline - Option A Castle Outline - Option B Castle Outline - Option C 2. Start by planning out the steps that a turtle needs to take to draw the castle outline that you choose. Use a paper or computing device. The outline should start from the left-hand side bottom corner as shown in the above figure. As you plan the steps, consider the following guidelines: Assume a rectangular drawing area that is 640 pixels wide and 480 pixels high. The castle must fit within this area. To draw a castle you may move the turtle anywhere you like within this rectangular box and you can pick up or put down the pen as often as you like. Assume that the turtle is already facing north and at the bottom left of the drawing area Assume that the pen is up (so it must be put down to draw the castle). After the turtle is done drawing the castle, the pen should be picked up Finally, the turtle should be turned to face up (ie, ready to draw). 3. Write the pseudocode for the algorithm you came up with in step 2 in a file (file format can be text, pdf or doc) and save it with the name drawCastleSteps. For example, to draw a method for 'Option A' using a simple text editor the file name would be drawCastleSteps.txt. o Part B - Program a method to draw the castle. (20 points) Now that you have your pseudocode, you need to convert that into a method that draws that castle. The method should be added in Turtle.java file. Your castle drawing method name must follow this format: drawCastle(Color c). For example, to draw a method for 'Option A, name it draw CastleA(Color). We will be using the Interactions pane to call and test your methods, so you MUST follow this format To test the castle method you write, use the DrJava Interactions pane. First, compile your code and fix any errors you get. Once the code compiles correctly. go to the Interactions pane and create a world and a turtle. Then call your castle drawing method with your turtle to see if it looks right in the world. Keep in mind that you might need to position your turtle at a certain position for your method to work correctly

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

Sybase Database Administrators Handbook

Authors: Brian Hitchcock

1st Edition

0133574776, 978-0133574777

More Books

Students also viewed these Databases questions