Ваши ошибки, как представляется, состоят из опечаток:
showImputDialog -> showInputDialog
pitTwo -> picTwo
turone -> turOne
unircorn -> unicorn
Ошибки копирования и вставки:
Turtle turFour = new Turtle(wor);
turFour.penUp();
Picture picFour = new Picture ("spongebob.png");
turTwo.moveTo(400,600); // probably should be turFour
turFour.drop (picFour);
turFour.forward(1);
И неполные фрагменты кода:
if( t % 3 == 1)
turOne.setColor(Color.PINK);
if( t % 3 == 2)
Худшееиз которых около 30 строк кода принадлежат методу, который так и не был объявлен!
У меня нет «черепашки доктора Ява» для сравнения, но ниже я переделываю ваш код, исправляющий столько проблем, сколько ясмог обнаружить:
import java.awt.*;
public class TurtleDrawing
{
public static void main(String args[])
{
boolean one = roomOne();
}
public static boolean roomOne()
{
World wor = new World(500, 500);
Picture picOne = new Picture("grocery.jpg");
Picture picTwo = new Picture("anteater.webp");
Turtle turOne = new Turtle(0, 0, wor);
turOne.penUp();
turOne.moveTo(200, 200);
turOne.drop(picOne);
turOne.moveTo(300, 100);
turOne.drop(picTwo);
turOne.hide();
turOne.forward(1);
JOptionPane.showMessageDialog(null, "Dequavis the anteater is shopping for bananas at his local grocery store");
String str = JOptionPane.showInputDialog(null, "If each bundle costs 3 dollars and he buys 2 bundles how much will he pay?");
return str.equals("6");
}
public static void unamed_function()
{
World wor = new World(1100, 800);
Picture picOne = new Picture("space.jpg");
Picture picTwo = new Picture("rocket.png");
Picture picThree = new Picture("unicorn.png");
Picture picFour = new Picture ("spongebob.png");
Turtle turOne = new Turtle(wor);
turOne.penUp();
turOne.moveTo(0, 0);
turOne.drop(picOne);
Turtle turTwo = new Turtle(wor);
turTwo.penUp();
turTwo.moveTo(200, 500);
turTwo.drop(picTwo);
turTwo.forward(1);
Turtle turThree = new Turtle(wor);
turThree.penUp();
turThree.moveTo(700, 600);
turThree.drop(picThree);
turThree.forward(1);
Turtle turFour = new Turtle(wor);
turFour.penUp();
turFour.moveTo(400, 600);
turFour.drop(picFour);
turFour.forward(1);
turOne.setColor(Color.BLUE);
int t = 0;
while (t < 200)
{
double x = (16 * Math.sin(t) * Math.sin(t) * Math.sin(t)) * -1 + 500;
double y = (13 * Math.cos(t) - 5 * Math.cos(2 * t) - 2 * Math.cos(3 * t)) - Math.cos(4 * t) * -10 + 400;
turOne.moveTo((int)x, (int)y);
t = t + 1;
turOne.penDown();
}
}
public static void heart(Turtle turOne, int startX, int startY)
{
double x = 0;
double y = 0;
int t = 0;
turOne.penUp();
if (t % 3 == 1)
{
turOne.setColor(Color.PINK);
}
else if (t % 3 == 2)
{
turOne.setColor(Color.GREEN);
}
}
}