Wrote the line segment program