URGENT!!
Write a program in java by using function overloading technique that computes and displays the
area of a parallelogram, a rhombus and a trapezium.
Formula:
Area of a parallelogram = b*h
Area of a rhombus = 1/2*d1*d2 [where, d1 and d2 are the diagonals]
Area of a trapezium = 1/2*(a+b)*h [where a and b are the parallel sides,
h = perpendicular distance between the parallel sides]
Write the main method to invoke all the above methods.
Answers
Answered by
3
Explanation:
URGENT!!
Write a program in java by using function overloading technique that computes and displays the
area of a parallelogram, a rhombus and a trapezium.
Formula:
Area of a parallelogram = b*h
Area of a rhombus = 1/2*d1*d2 [where, d1 and d2 are the diagonals]
Area of a trapezium = 1/2*(a+b)*h [where a and b are the parallel sides,
h = perpendicular distance between the parallel sides]
Write the main method to invoke all the above methods.
Similar questions