Object Oriented Programming - Old Questions
Question Answer Details
3. Define a Shape class (with necessary constructors and member functions) in Object-Oriented Programming (abstract necessary attributes and their types). (Write a complete code in C++ programming language)
• Derive Triangle and Rectangle classes from Shape class adding necessary attributes.
• Use these classes in a main function and display the area of triangle and rectangle.
Answer
AI Generated Answer
AI is thinking...