Implemented getAngles as in the slides

I need the lengths of the joints so I added it to the constructor