1.1-Introductie-Programmeren

Draw a triangle

Difficulty: Filled Outlined Outlined

Create a program that allows you to draw a triangle by implementing the drawTriangle() method. Note that the triangle consists of 3 individually drawn lines.

The location of the triangle on the screen is something you are allowed to hard code. So just an invocation of the drawTriangle() method should be enough to display the triangle on the screen.

Example

Example

You can use the image below to figure out how to calculate the triangle coordinates. Triangle draw help