Question: Use JavaScript and HTML to make boxes that bounce around on the screen. You should create a Construction Function to build a Box class: Properties

Use JavaScript and HTML to make boxes that bounce around on the screen.

You should create a Construction Function to build a Box class:

Properties

x, y position

width, height

velocity x, y

color

Methods

Move

Draw

Check/Handle bounds

Once you successfully create a usable (reusable) "class" you should be able to make a bunch of boxes bounce around the screen with an array.

How can i do this inthe simplest way using two files, an html file and a javascript file?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!