Your Name: __________________________________________________
Your esus e-mail address: _______________________________________
The objective of this laboratory session is to give you opportunity to resolve any questions you may have regarding basic use of UNIX and BlueJ, and to test a simple BlueJ program.
Print this page and circle the answers to the following questions (if you read this before your laboratory session, you can do this ahead of time):
If you answered "No" to any of the questions, be sure you get all of your questions clarified. After this day we will assume that you have no major problems with your Unix account, simple HTML and Web pages, Blue J, and simple Java programs.
An important aspect of using objects is that we need to know only the interface that they
present to us as programmers. Quite complicated algorithms can be hidden behind hopefully simple interfaces. For example, BasicGraphics is a class provided with the textbook. This will allow you to display a window on the computer screen containing shapes of different kinds, sizes, positions and colors.Before you can use an object, you have to know something about its behavior. The
BasicGraphics class draws an area 600 units (or "pixels") wide by 400 units high, with the origin (0,0) at the top left-hand corner of the area.Once you have understood how to use these methods, do the following:
(a) Using Blue J interactively, create a BasicGraphics instance, specify a single red square centered at (200, 200) with side 60, and display it. (Note: you must specify the color using the full color name (e.g. java.awt.Color.blue)
(b) Modify the source code of the program to display three different shapes of your choice, each with different colors.
Before you leave you must: