Graphing
Calculator
Math
Worksheets
Scientific
Calculator
Chart
Maker


Home
Graphing Calc
Algebra
Fun Games
Geometry
Interactive
Trigonometry
Scientific Calc
Home
Graphing Calc
Algebra
Fun Games
Geometry
Interactive
Trigonometry
Scientific Calc

Creating Java Objects with BlueJ

BlueJ Object Examples

After you have downloaded and installed BlueJ, you can start working with some pre-created Java Objects that you get with BlueJ. You will need to find the examples folder that will be in the directory you installed BlueJ. If you can't find the examples directory, just download and unzip this link. (This zip file is a modified version of the examples that folder you get with BlueJ)
  • From your BlueJ console, click on Projects-> Open Project
  • Navigate to the shapes folder within the examples folder
  • Once the shapes have been opened you should see something like
  • Now compile the classes and lets create a Circle

Programming project 1 : Rewrite Constructors



  • 1) If you remember the project on code reuse and overloaded constructors in Java, then you should see that the constructors for the Circle class do not employ code reuse. Your first job is to rewrite the constructors so that NO code is reused.
  • 2) Mess around with the methods of each object until you understand what all of the methods of the objects do. To access a method right click on the object. See the picture below.

Programming Project 2: Picture

    Open up the picture project in the folder that you downloaded. Your job is to modify the picture class to display a completely different picture. Below is the original version of "picture" . Your picture should be completely different but should have at least 5 objects(any combination of circle, square and triangle)

Programming Project 3: Animation

  • 3) Create a class called animation this picture should have multiple balls and triangles and should display something interesting. If you'd like to see an example to guide you, download this project. There is a picture of it below. If you would like to get an A on this project, then you 3 different objects must use animation. If you download this project, you'll see that you can use the bounce() method.