Using a Turtle from Exercise 23 and employing the incremental development steps, build a Java application that draws a house.
Reference Exercise 23: At the author’s website, you will find a Java package called galapagos. The galapagos package includes a Turtle class that is modeled after Seymour Papert’s logo. This Turtle has a pen, and when you move the Turtle, its pen will trace the movement. So by moving a Turtle object, you can draw many different kinds of geometric shapes. For example, this program commands a Turtle to draw a square:
import galapagos.*;
class Square {
public static void main( String[] arg ) {
Turtle turtle;
turtle = new Turtle( );
turtle.move( 50 ); //move 50 pixels
turtle.turn( 90 ); //turn 90 deg counterclockwise
turtle.move( 50 );
turtle.turn( 90 );
turtle.move( 50 );
turtle.turn( 90 );
turtle.move( 50 );
}
}
Write a program to draw a triangle. Read the documentation and see if you can find a way to draw the square in a different color and line thickness.
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.