Title: JH7 Homework
Course: CPS 161: An Intro to Programming with Java - DL MM MASTER

JH7 Homework (50 points)

Create an Eclipse project named JH7_xxxxx where xxxxx is your NetID. For example: JH7_chasselb. Create the programs described below in this project. Fill in the required fields in the JH7_worksheet.txt file. Export your project file and upload it to blackboard as your work for this assignment. The worksheet file will be pasted into the blackboard comments section.

As you write your code make sure you adhere to the following standards:          Rubric

Make sure you do your Class Participation (5 points)

stickman problem (10 points):

Create a package named stickman and add a class derived from JFrame.

- Do all the normal things like add a title to your JFrame of "My First Drawing".
- Set the size of the window to 500 by 500.
- Make the JFrame visible
- Set the default window operations on close to EXIT_ON_CLOSE
- Your class should override the method: paint(Graphics g)
- Have your paint routine draw a stick man something like the following image:

No output required for stickman ... your code will be run to see your output

ellipses problem (10 points):

Create a package named ellipses and create a class derived from JFrame that produces the following image:

HINT:
This was done by using fillOval multiple times alternating between the color blue and
the   color red.  In the x,y,w, h parameters for fill oval the following occurred:
The first oval started with x=0; y=0; w=width of screen; h = height of screen;

After that on each iteration you can do the following:
x += 5;
y += 5;
w -= 10;
h -= 10;

Continue looping until either w or h is <= 0

No output required for stickman ... your code will run to see your output

tic_tac_toe problem (25 points):

Create a package named tic_tac_toe and execute the following instructions:

Click here for instructions

Run the TicTacToe program as specified in the JH7 instructions and insert the output into the appropriate section of the JH7 worksheet.

September 3, 2015 5:49 AM