Inlab 1: Getting Started
Due: Thursday 21 January at 11:59 pm
Purpose
- Meet your lab TA.
- Familiarize yourself with the lab computers and the BlueJ environment.
- Manipulate your first Java program.
Partners
This is an individual assignment, though collaboration (not solution sharing) is allowed.
Assignment
- After signing into one of the lab computers,
open up BlueJ and create a new project called
Inlab1.
- Within the Inlab1 project, create a new class called
Art.
- Copy and paste this code into Art and execute (run) the program. (Instructions in January 15th lecture or here.)
- 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.
- 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.
- Copy and paste this code into a new class called Error1.
- Copy and paste this code into a new class called Error2.
- In a text document, answer the following questions:
- What type (compile-time or run-time) of error prevents Error1 from executing properly? How can you fix it?
- 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
- 4 points - Art.java compiles, runs, and outputs an appropriate image (or ASCII art).
- 2 points - The text accompanying the output reflects the new image and artist.
- 4 points - Answers to the questions are correct.