Program: Write a program that allows the user to specify a triangle with three mouse presses. After the first mouse press, draw a small dot. After the second mouse press, draw a line joining the first two points. After the third mouse press, draw the entire triangle. The fourth mouse press erases the old triangle and starts a new one.
You need to implement a program that draw the triangle with mouse presses.
Can someone demonstrate me how to write a proper code for this problem and how to complete it. Thanks