A collection of Java Swing programs created for H Computer Science II
Objective: Create abstract art using rectangles, ovals, and lines with random colors, sizes, and positions.
Requirements:
-
Draw at least 10 shapes
-
Use random colors for each shape.
-
Use random numbers for shape placement and size. Experiment with layering, transparency, and overlapping shapes for artistic effect.
nix run .#Abstract
Objective: Draw an emoji-style face using ovals, arcs, and rectangles. No, not just the basic smiley from the textbook.
Requirements:
-
Face should include:
- Yellow circle head, eyes, and mouth
-
Add creative elements like eyebrows, hats, or sunglasses using shapes.
nix run .#Emoji
Objective: Use rectangles and ovals to create a silhouette of a city skyline at night.
Requirements:
-
At least 8 buildings of varying heights and widths.
-
Include windows as small rectangles (with random lights on/off using color).
-
Draw a moon using an oval and perhaps clouds with arcs or overlapping ovals.
nix run .#Skyline
Objective: Create an outdoor landscape
Requirements:
- Add a sun (yellow oval), grass (green rectangle), and clouds (white/gray ovals).
- Add hills, mountains, and/or trees or additional elements to the horizon.
nix run .#Landscape
Objective: Design a monster or alien using only simple shapes.
Requirements:
-
Must use:
- At least 2 ovals, at least 2 rectangles, and at least 1 arc
-
Creative additions like antennae, arms, and accessories.
nix run .#Monster
Objective: Draw a stylized house using only basic shapes.
Requirements:
-
Rectangle for the house body.
-
Triangle roof using 3 lines.
-
Door and windows as rectangles or ovals.
-
Add a sun (oval), chimney (rectangle), and smoke (arcs or ovals).
nix run .#House
Objective: Recreate or reinterpret the Cumberland Valley (CV) logo using Java graphics.
Requirements:
-
Use red, black, and white as primary colors.
-
Must feature a large "CV" made from rectangles, lines, or creative compositions of shapes.
-
Add accent elements (e.g., an oval outline, background rectangle, or stylized border).
Objective: Create a pattern that simulates a spirograph or kaleidoscope using repeated arcs, lines, or ovals.
Requirements:
-
Draw a looping or circular pattern using symmetry.
-
Must include at least 12 repeated elements, each slightly rotated or offset.
-
Use at least 3 different colors.





