@@ -0,0 +1,1181 @@
+import java.awt.*;%0Aimport java.awt.event.*;%0A%0Apublic class Solution extends Frame %7B%0A%09%0A%09public static int mouseX;%0A%09public static int mouseY;%0A%09public static int mousePressCount = 0;%0A%09public static int lineStartX;%0A%09public static int lineStartY;%0A%09public static int lineEndX;%0A%09public static int lineEndY;%0A%09%0A%09public Solution() %7B%0A%09%09super(%22COP - dvt32, 146518 - Lines%22);%0A%09%09setSize(1024, 768);%0A%09%09setBackground(Color.decode(%22#89cff0%22));%0A%09%09addWindowListener(new WindowAdapter() %7B%0A%09        public void windowClosing(WindowEvent we) %7B%0A%09            dispose();%0A%09         %7D%0A%09     %7D%0A%09%09);%0A%09%09addMouseListener(new MouseAdapter() %7B%0A%09%09%09public void mousePressed(MouseEvent e) %7B%0A%09%09%09%09mouseX = e.getX();%0A%09%09%09%09mouseY = e.getY();%0A%09%09%09%09mousePressCount++;%0A%09%09%09%09if (mousePressCount %25 2 != 0) %7B%0A%09%09%09%09%09lineStartX = mouseX;%0A%09%09%09%09%09lineStartY = mouseY;%0A%09%09%09%09%7D%0A%09%09%09%09else %7B%0A%09%09%09%09%09lineEndX = mouseX;%0A%09%09%09%09%09lineEndY = mouseY;%0A%09%09%09%09%09repaint();%0A%09%09%09%09%7D%0A%09%09%09%7D%0A%09%09%7D);%0A%09%09setVisible(true);%0A%09%7D%0A%09%0A%09public void paint(Graphics g) %7B%0A%09%09if (lineStartX != lineEndX && lineStartY != lineEndY) %7B%0A%09%09%09g.drawLine(lineStartX, lineStartY, lineEndX, lineEndY);%0A%09%09%7D%0A%09%7D%0A%09%0A%09public static void main(String%5B%5D args) %7B%0A%09%09Solution mainWindow = new Solution();%0A%09%7D%0A%0A%7D%0A

Create Lines.java