Maturaarbeit 2.0 Updates

Because I can’t post the entire code of my project (it has grown a lot!) I’m just going to create a little UML-Diagram. In this you are able to see my progress, my current project-class-design and how the classes are associated. To draw this UML-Diagram I’ll use a very nice program, it’s called “dia”. Dia is easy to install on ubuntu, just “sudo apt-get install dia”. For all the other operating system just visit dia for download.

As you can see, there are 3 classes now! I decided to create my own Point.class for all the different operations I’ll need later to calculate the new positions of the bodies. Therefore you can do a lot of things with a point. You can calculate his scalarProduct, his abs, get the same Point normed to length 1 and so on…
To go on with, a body has almost the same parameters as the old body had, but the position and the velocity are points now, because I’m going to solve this problem in 2D & 3D and therefore it is good to have “vectors”.
Finally, there is an Universe.class, this class has all the bodies used for the n-body-problem. It just has a list of all bodies and it is able to add new bodies or select and return all the bodies expect for the one who called!

Next steps to do:

  • make tests for the nextPosition()-method and then create this method correctly
  • make some GUI design by hand
  • decide how to make the GUI (SWT/AWT/GTK/Swing)
  • think about how to “draw” the program in a Panel

So that’s it for today, I’ll keep you up to date and just follow me on Twitter @D3orn for more informations.
Cheers

  1. No comments yet.

  1. No trackbacks yet.