0% found this document useful (0 votes)
15 views2 pages

Java Standard Edition: HTML / Css / Javascript

The document provides specifications for creating an animation of a bouncing ball in Java. It details that the main window should be 100x300 pixels with a red background. The yellow ball should be 40 pixels wide and bounce up and down with constant speed, getting progressively less bouncy over 10 bounces. It also specifies that the program must use a dedicated animation thread. A menu bar with "Start over" and "Exit" options should be included, with "Start over" restarting the animation thread. The program is graded on meeting specifications around dimensions, colors, ball behavior, threading, and menu functionality.

Uploaded by

Aymen Mechergui
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views2 pages

Java Standard Edition: HTML / Css / Javascript

The document provides specifications for creating an animation of a bouncing ball in Java. It details that the main window should be 100x300 pixels with a red background. The yellow ball should be 40 pixels wide and bounce up and down with constant speed, getting progressively less bouncy over 10 bounces. It also specifies that the program must use a dedicated animation thread. A menu bar with "Start over" and "Exit" options should be included, with "Start over" restarting the animation thread. The program is graded on meeting specifications around dimensions, colors, ball behavior, threading, and menu functionality.

Uploaded by

Aymen Mechergui
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

HTML / CSS / JavaScript

RESIT

Java Standard Edition


Academic Year 2012 - 2013 Bouncing Ball

Graded Exercise

Page 1 / 2

HTML / CSS / JavaScript


RESIT

Context
You have been hired as a consultant in a physical research institute. To demonstrate a simple physical law, they asked you to represent a bouncing ball. As you want to develop it quickly and easily you naturally choose Java Standard Edition with Swing API.

Specifications
The main window must be 100 pixels wide and 300 pixels high, with a red background. The ball has to be yellow and 40 pixels wide. To simplify a little this representation, the ball goes up and down with a constant speed. The more the ball hits the floor, the less tall it goes. After ten bounces, it must stop. The institute wants to incorporate this little animation in a wider animation system for teaching purposes. As a result, you have to use a thread dedicated to ball animation! Also, youre asked to add to your window a menu bar with a single Menu tab, containing Start over and Exit items. The Start over button will restart the animation thread presented above.

Notation
Functionalities Widths, heights and colors are respected The ball falls The ball goes up after hitting the floor The ball bounces less and less tall Menu bar is present Exit item works as expected Start over item works as expected Malus: Didnt use threads TOTAL Points 2 4 5 4 1 1 3 -5 20

Page 2 / 2

You might also like