CS152
Spring 2007
Project#4
Snowman
Make the following modification to the Snowman class.
SUBMIT:
COVER PAGE should have the following table
|
Class |
CS152 Spring 2007 |
|
Project |
Project #4 Snowman |
|
Instructor |
Irena Pevac |
|
Student Name |
|
|
Date submitted |
|
|
Design 10% |
|
|
Code 80% |
|
|
Testing 10% |
|
Project #5
Stars in the Night
Create class called Star that represents a graphical depiction of a six pointed star. Let the constructor of the Star class accept the radius of the star, color, and the center point location specified with x and y. Star class should also have method drawStar(Graphics page, Color starColor) to draw a six pointed star in starColor color on the graphics surface page. Star should be centered in x,y and should be six pointed star drawn within a circle with radius size. Class Star may also include methods to set/get variables radius, color, x, and y. No star should be partially displayed.
Class SkyPanel
that extends Jpanel
should have an array of 30 stars, called starArray, and an array of 5
colors, called colorArray. Constuctor SkyPanel() should instantiate 30 stars randomly
placed, each with random color from colorarray . Assign stars to starArray. Stars should be drawn in paintComponent
method in one
of the five colors from colorArray using drawStar method.
Class StarNight should have main method.
SUBMIT:
COVER PAGE should have the following table
|
Class |
CS152 Spring 2007 |
|
Project |
Project #5 Stars in the Night |
|
Instructor |
Irena Pevac |
|
Student Name |
|
|
Date submitted |
|
|
Design 15% |
|
|
Code 70% |
|
|
Testing 15% |
|