Constructor:A constructor is a special method used for initializing objects when they are created. The Pie class may have a constructor that allows us to set specific attributes (e.g., type of pie, ingredients) when creating a new instance of a pie.
Encapsulation:Encapsulation is the bundling of data and methods together within a class. The Pie class encapsulates both the properties (data) and behaviors (methods) related to pies, keeping them organized and easily accessible.
Polymorphism:Polymorphism refers to the ability of an object or method to take on many forms. In the context of the Pie class, it means we can have different types of pies (e.g., apple pie, pumpkin pie) that share common behaviors but may implement them in slightly different ways.