For this assignment you should write a set of classes including Star
,
Constellation
and Edge
. Between these, you should
implement methods that will allow you to draw a picture of a constellation in a
DrawingPanel
(you can download the code for this from
the textbook website's
supplement section).
You should have data for the stars part of the constellation from the last lab.
You should be able to do most of this from what you saw in lecture (well, by Wednesday's lecture!), but here are some tips and pointers to remind you about some of the tricky parts:
Star
, Edge
and
Constellation
) should have a public void paint(...)
method which takes a Graphics
parameter (traditionally called
g
). You can pass the graphics parameter in to the original
constellation paint method, which can then "pass the buck" (i.e., the graphics
parameter) in to each of the star and edge paint methods.
import java.awt.*;
" at the top of each file, outside/above
the class definition.)
(int) expression
.