8000 GitHub - vincentyonathan/BouncingBallJava: A Java Program of Object Oriented Programming
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

vincentyonathan/BouncingBallJava

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BouncingBallJava

A Java Program of Object Oriented Programming

This Program is created with Java to Strengthen the Concept of OOP

The Program itself Consist of 4 Classes which are :

  1. Ball :

This Class contains the attributes of each balls, the attributes are Speed, Coordinates Radius, and Color. This class also contains Collide Function/Method of the ball with the frame, and also the ball to another ball.

  1. Ball Area :

This class contains the frame area, initialize the height, width and color of the area and also the draw function to render the background

  1. Ball Panel :

This class consisted of the Refresh rate of the ball and the array to store each ball. Also implementing action listener to initialize a new ball everytime space key is pressed. This class cosntructor is the one which called a new ball, and last the function to start the thread as the ball started to bounce. I also added a random function to generate new color everytime a new ball is initialized

  1. Main :

This class is used to initialize Frame using Java Swing JFrame, and to compile the whole code to create the beautifull screen saver of multiple bouncing ball

About

A Java Program of Object Oriented Programming

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0