-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTriangle.cs
More file actions
36 lines (33 loc) · 989 Bytes
/
Triangle.cs
File metadata and controls
36 lines (33 loc) · 989 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
using System;
using System.Collections.Generic;
using System.Text;
namespace calculator
{
public class Triangle
{
public double SideA { get; set; }
/*public double SideB { get; set; }
public double SideC { get; set; }*/
public double Height { get; set; }
//public double result = 0;
//public string Operation { get; set; }
public Triangle(double sideA, double height /*, string operation*/)
{
this.SideA = sideA;
this.Height = height;
//this.Operation = operation;
//switch (this.Operation)
//{
// case "TriangleArea":
// result = (this.SideA * this.Height) / 2;
// break;
//}
}
public double TriangleArea(double sideA, double height)
{
double result;
result = (this.SideA * this.Height) / 2;
return result;
}
}
}