Answered step by step
Verified Expert Solution
Link Copied!

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

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

What is the cerebrum?

Answered: 1 week ago