Create a class for regular pyramid and call it RegularPyramid. The RegularPyramid objects should be constructed by provi
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
Create a class for regular pyramid and call it RegularPyramid. The RegularPyramid objects should be constructed by provi
Create a class for regular pyramid and call it RegularPyramid. The RegularPyramid objects should be constructed by providing number of sides, side length, and the height length only.Your RegularPyramid should have the following methods:Method slantHeight for calculation of slant heightMethod baseCircumradius for calculation of the circumradius of the base polygon.Method basePerimeter for calculation of the base perimeter.Method baseArea for calculation of the base area.Method lateralArea for calculation of the lateral area.Method totalSurfaceArea for calculation of all surface areas.Method baseArea for calculation of the base area.Method volume for calculation of the regular pyramid volume.