Points, Lines, Triangles, and Quadrangles
- Download and add DrawingBoard.jar to the BlueJ library.
This jar file contains a package named DrawingBoard,
which contains a class named DrawingBoard.
DrawingBoard objects contain a method
with the following signature: public void draw (LineTypeObject
), which can be used to draw line-like objects on the screen.
- Download and extract the files in PointLine.zip into a new BlueJ project.
- Complete the definitions for the classes Line, Triangle, and Quadrangle.
Solutions: Line.java, Triangle.java, TestDB.java