Hi there! I'm very confused over
java right now. I'm a beginner and (my prof hardly speaks English). In our assignment, we need to take some entities and create a java class/constructor and show how to instantiate them.
Here are two entities I'm currently stuck on.
For the Coordinate class, I've written:
This was following an example given to us.
However, I'm pretty sure something about it is incorrect in the instantiation..
I did a similar thing with the circle class, but something tells me I have to use a "has-a" relationship?
Or maybe I would use "has-a" only for another entity (Cat [head {Circle}, body {Rectangle}, feet {Line[4]}, tail {Line}]). which probably makes more sense...
And even then, I don't know how to go about doing that.
A little guidance would be much appreciated
Thanks in advanced.