Question

Consider a Shape class with a method draw(), and Circle and Rectangle classes that inherit from Shape and override draw(). If you have a List containing Circle and Rectangle objects, calling draw() on each element demonstrates:

A Encapsulation
B Abstraction
C Inheritance
D Polymorphism
E Composition
Practice Next

Hey! Ask a query