Computer Science, asked by Anurag9555, 10 days ago

Write a class with the name Area using function overloading that computes the area of a parallelogram, a rhombus and a trapezium.​

Answers

Answered by sakash20207
0

Area of a parallelogram (pg) = base * ht

Area of a rhombus (rh) = (1/2) * d1 * d2

(where, d1 and d2 are the diagonals)

Area of a trapezium (tr) = (1/2) * ( a + b) * h

(where a and b are the parallel sides, h is the perpendicular distance between the parallel sides)

Similar questions