Write a class shape. It should have some suitable functions e.g., area, perimeter, etc. Write classes circle,
Fantastic news! We've Found the answer you've been seeking!
Question:
Write a class shape. It should have some suitable functions e.g., area, perimeter, etc. Write classes circle, triangle, and rectangle and inherit from shape class. Write individual functions in them for area, perimeter, and at least one more common function which you can think of. Write a program and create objects of child classes. Calculate area, perimeter/circumference etc. Take the values of variables from the user. Declare suitable data members as well. Think which data members do you need and in which class should you declare them.
Related Book For
Business Statistics In Practice
ISBN: 9780073401836
6th Edition
Authors: Bruce Bowerman, Richard O'Connell
Posted Date: