Getters and setters and constructors with Java
I'm working on a project which creates shapes, but I'm having problems with what the shapes need in terms of getters, setters and constructors. I just don't get them. 

So far, I've got: 

    import java.awt.Graphics2D;

    public class MyLine extends MyShape{

	public void renderShape(Graphics2D g2d) {
		g2d.drawLine(p1.getX(), p1.getY(), p2.getX(), p2.getY());		
	    }
	
	

    }

Can anyone explain constructors, getters and setters so that I can complete this code? And also how would I do it with an elliptical shape? 
Getters and setters and constructors with Java
===

I'm working on a project which creates shapes, but I'm having problems with what the shapes need in terms of getters, setters and constructors. I just don't get them. 

So far, I've got: 

    import java.awt.Graphics2D;

    public class MyLine extends MyShape{

	public void renderShape(Graphics2D g2d) {
		g2d.drawLine(p1.getX(), p1.getY(), p2.getX(), p2.getY());		
	    }
	
	

    }

Can anyone explain constructors, getters and setters so that I can complete this code? And also how would I do it with an elliptical shape? 