Inlab 1: Getting Started

Due: Thursday 21 January at 11:59 pm

Purpose

Partners

This is an individual assignment, though collaboration (not solution sharing) is allowed.

Assignment

  1. After signing into one of the lab computers, open up BlueJ and create a new project called Inlab1.
  2. Within the Inlab1 project, create a new class called Art.
  3. Copy and paste this code into Art and execute (run) the program. (Instructions in January 15th lecture or here.)
  4. The original program draws a picture of an arrow. Modify it so that it draws something different (but at least as cool as an arrow) and change the text to accurately reflect the new output.
  5. For example, here is MSU printed in ASCII text art MSU. I used this generator. Also note, special characters like the backslash have to be escaped - see character tutorial.
  6. Copy and paste this code into a new class called Error1.
  7. Copy and paste this code into a new class called Error2.
  8. In a text document, answer the following questions:
    1. What type (compile-time or run-time) of error prevents Error1 from executing properly? How can you fix it?
    2. What type (compile-time or run-time) of error prevents Error2 from executing properly? How can you fix it?

Submission

By Thursday night at 11:59 pm, submit the file Art.java and the text document containing answers to the questions into the appropriate D2L dropbox folder. DO NOT SUBMIT Art.class, just Art.java! Art.java can be found in the project folder (Inlab1) you created.

Grading - 10 points