Write a full program for a class named Polygon with two public data members' width and height. Create two classes Rectan
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
Write a full program for a class named Polygon with two public data members' width and height. Create two classes Rectan
Write a full program for a class named Polygon with two public data members' width and height. Create two classes Rectangle and Triangle derived from Polygon class and use the public data members (in the base class) in the method called area () to calculate areas of rectangle and triangle in the derived classes. Formula area of triangle: 1/2∗ base*height Formula area of rectangle: width * height
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!