Java Standard Edition: HTML / Css / Javascript
Java Standard Edition: HTML / Css / Javascript
RESIT
Graded Exercise
Page 1 / 2
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