Question: Create a graphics program to draw moving stars and rectangles in java graphics Ask user to input how many objects do you want to create?
Create a graphics program to draw moving stars and rectangles in java graphics
Ask user to input how many objects do you want to create?
draw (how many / 2) stars
draw (how many / 2) other shapes
apply collision detection to all the stars and shapes (right-left-top-bottom)
You must use only one ArrayList to save the shapes info.
You must use random class to set initial values of each shape (x, y, size, speedx, speedy, color, etc)
INCLUDE THESE
import java.awt.Color; import java.awt.Graphics; import javax.swing.JFrame; import java.util.*;
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
