Help with Perimete and Area of triangle

Hi, ive got to make a program to find the perimeter and area of a triangle made using vectors, and i have not a clue, ill post the code i have done so far and if any1 could give me the code for the area and perimeter you would be life savers, thanks in advance.

Now if you want to calculate the distance between any two points ex P(x1,y1) and Q (x2, y2) on a plane the formula is:-
Square_Root [(x2-x1)^2 + (y2-y1)^2]

So using that formula you can get the length of all the three sides of the triangle. Next to calculate the Area of the triangle Whose length of sides are a,b and c the formula is :-

Area = Square_Root [s(s-a)(s-b)(s-c)]
where s -> Semiperimeter that is half the perimeter.

I think this is called the Herons Formula or something similar.

Now I have given you the formulae just convert them to your code.

Plus are you sure the code you have pasted is the working code ?? Cause the area of a rectangle is (base (areax) * height(areay)) why do you have "(area * area)" added to it ??? Are you sure about what you are doing here ??
Also your program would fail if the rectangle is not perfectly horizontal that is the base is inclined at some angle with the X-Axis.

I hope this is good enough to get you on the way.

<Edit> I think you code is currently working cause since the variable area is declared at the class level, it is by default initialized to 0, hence (area * area) would give you just 0, but if this were C++ you would have found it out earlier as it would give you garbage values.
Also another suggestion would be to drop the IM or SMS speech while posting, type the words fully so we do not have to figure out what you are actually trying to say.

If your instructor is ignorant enough this time too I guess you will get away with this also. According to me that is completely the wrong way to calculate the perimeter.

I had already given you the formula for calculating the length of the sides of the triangle (Square_Root [(x2-x1)^2 + (y2-y1)^2]) from which you could calculate the perimeter and then the area.

But to me this appears plain wrong it will give you the incorrect perimeter and will also finally give you a wrong answer for the area of your triangle.

BTW if you do not know what a perimeter is, it is supposed to be the length of the shape, so for the triangle it would be the sum of the length of all the three sides, But honestly such things are basic geometry you should know about.

<EDIT>
Also a word of advice, do not simply program to get the marks, Soon no one is going to care whether you got 50 on 50 or 49 on 50 for a kiddy assignment, do it to learn and honestly from the way you have done both your assignments your attitude is nowhere near that.