Brian Kellytt wrote:1 A point class which has 2 private integer variables x and y and performs all the setter and getter methods for x, y and x and y and methods.
Ah, but that's only
one way to think about it.

Another is to make it
immutable, viz:
and then just provide
getters for x and y. It's a slightly more functional style, but it tends to make the API a lot smaller.
BTW, x and y are
not points, they're simply axis values; and your class describes a
single point, so its name should probably be singular too.
2. A triangle class which has 3 variables of type Points (the first class).
...
In the triangle class your constructor is:class triangle(int x1, int y1, int x2, int y2, int x3, int x4){[/code]
And why would you do it like that? Surely, you could just have:
public Triangle(Point p1, Point p2, Point p3) {
Is this not the same and what if any effect would this have on the driver class when calling methods etc?
Looks like it to me, but obviously your driver class would have to call
those methods rather than plain old
setX() and
setY().
You'll discover as you go further that there's almost always more than one way to skin a cat, which is why there's rarely a "right" way to do things.
HIH
Winston