Finding side of triangle? this is probably a basic question but I haven't taken a geometry class since high school

My professor wants us to create a program that tells the user to enter three points (x1,y1),(x2,y2), and (x3,y3) to ultimately find the area of a triangle 

she wants us to use this formula; s=(side1+side2+side3) then area^2 = ( s(s-side1)(s-side2)(s-side3) )

My question is how do I get the sides??
Another way to approach to the solution. Is use the following:


  Let $A=(x_1,y_1)$, $B=(x_2,y_2)$ and $C=(x_3,y_3)$ points in a plane. The area of the triangle $ABC$ is $$[ABC]=\frac12 \left| \begin{matrix} 1&amp;x_1&amp;y_1\\1&amp;x_2&amp;y_2\\1&amp;x_3&amp;y_3\end{matrix}\right|$$


Then you only have to find a determinant, and if you do not want negative area, apply absolute value to the final answer.
Use the co-ordinates given to you by the  user. Assuming they are in order or appearance, x =x2 - x1 gives you the horizontal length of the side, and y = y2-y1 gives you the vertical distance, from there you take sqrt ( x^2 + y^2) and volia, you have your side length. Repeat for the other sides and then use the formula your professer gave