Lesson 2

2.1

  1. EXCEPTION error. No .java files are provided. Probably due to wrong file name.
  2. No, wrong file name.
  3. Yes, Java files must have the .java extension.
  4. There is an error. The p in myPainter.move(); must be capitalized.
  5. Yes, code is case-sensitive.

2.2

  1. error: reached end of file while parsing

Need another } to finish code.

  1. Yes, each opening curly brace needs a closing curly brace.
  2. error: not a statement and error: ';' expected, meaning the command syntax is wrong.

Correct syntax: mypainter.move();

  1. See #3
  2. Yes, the error is fixed.

3.1

  1. Painter starts at top left grid and faces east.
  2. Stops at row 2 column 3, faces south.
  3. Painter moves forward but does not paint because he has ran out.
  4. Error because did not add () at Painter;
  5. Added ()