static void Main(string[] args) { MathTrapezoidSample trpz = new MathTrapezoidSample(20.0, 10.0, 8.0, 6.0); Console.WriteLine("The trapezoid's bases are 20.0 and 10.0, the trapezoid's legs are 8.0 and 6.0"); double h = trpz.GetHeight(); Console.WriteLine("Trapezoid height is: " + h.ToString()); double dxR = trpz.GetLeftBaseRadianAngle(); Console.WriteLine("Trapezoid left base angle is: " + dxR.ToString() + " Radians"); double dyR = trpz.GetRightBaseRadianAngle(); Console.WriteLine("Trapezoid right base angle is: " + dyR.ToString() + " Radians"); double dxD = trpz.GetLeftBaseDegreeAngle(); Console.WriteLine("Trapezoid left base angle is: " + dxD.ToString() + " Degrees"); double dyD = trpz.GetRightBaseDegreeAngle(); Console.WriteLine("Trapezoid left base angle is: " + dyD.ToString() + " Degrees"); }
static void Main(string[] args) { MathTrapezoidSample trpz = new MathTrapezoidSample(30, 40, 8.0, 6.0); // this sets the length of the trapeziums sides. Console.WriteLine("The trapezoid's bases are 30 and 40, the trapezoid's legs are 8.0 and 6.0"); //this displays the side lengths. double h = trpz.GetHeight(); Console.WriteLine("Trapezoid height is: " + h.ToString()); double dxR = trpz.GetLeftBaseRadianAngle(); Console.WriteLine("Trapezoid left base angle is: " + dxR.ToString() + " Radians"); double dyR = trpz.GetRightBaseRadianAngle(); Console.WriteLine("Trapezoid right base angle is: " + dyR.ToString() + " Radians"); double dxD = trpz.GetLeftBaseDegreeAngle(); Console.WriteLine("Trapezoid left base angle is: " + dxD.ToString() + " Degrees"); double dyD = trpz.GetRightBaseDegreeAngle(); Console.WriteLine("Trapezoid left base angle is: " + dyD.ToString() + " Degrees"); Console.ReadLine(); }