Classes representing figures on a plane
Shape

A Shape is only an abstraction to unify different geometric constructs so my advice would be to make it an abstract class. (that is, a class that you cannot instantiate).

Point

Point as x and y coordinates. That's it. You have to decide if it inherits from Shape but from an OOP perspective I do agree with @simon-forsberg that it probably shouldn't.

Segment

Segment is defined by two Point and inherits from Shape. 

Triangle

Triangle is three Point and inherits from Shape.

And you can keep doing that for Rectangle and Square, just being careful with how you set up your constructors. Every classes should extend Shape but Point. 

Encapsulation

When you declare fields like x,y for Point, don't forget to give them a visibility modifier like private or protected (I assume you know what that means?) and then declare appropriate setter/getter.