Home > Net >  O, give advice or comments
O, give advice or comments

Time:09-29

Define a description of the Triangle Triangle, requirements are as follows:
There are three members of the integer class fields and properties: b1, b2 and b3, respectively the three sides of the triangle,
The field in properties,
Keyboard input the three sides of the triangle,
IsTriangle definition method can judge whether the three sides of a triangle (on both sides of the sum is greater than the third side) (with no parameters)
Note: this method returns the result for Boolean
Girth definition method for the perimeter of the triangle, and returns the integer types results (with no parameters),
Area definition method based on Helen formula calculating the Area of a triangle, and returns the result of the double type (with no parameters)
Helen formula:
Assumption in the plane, there is a triangle, side length respectively. A, b, c, then the area of a triangle can be obtained by Helen formula: S p (p - a) S=) (p - b) (p - c)
Note: the p in the formula to half perimeter: p=(a + b + c)/2
  •  Tags:  
  • C#