Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started