Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Create a class Geometry without any data member. Another class Circle is inherited from Geometry class which declares radius (of type float) as its data
Create a class Geometry without any data member. Another class Circle is inherited from Geometry class which declares radius (of type float) as its data member. Derive another class Square from Geometry that declares side as its data member (of type int). By using the concept of polymorphism , display the area and perimeter of Circle and Square in main()
Area of Circle: PI*r2
Area of Square: r2
Perimeter of Square :4r
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Document Format ( 2 attachments)
636825f616869_240837.pdf
180 KBs PDF File
636825f616869_240837.docx
120 KBs Word File
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started