QUESTION IMAGE
Question
one way your program uses object - oriented programming is through polymorphism. what is one way polymorphism is implemented? hiding class variables from the programs using instances of the class created a new class using an existing class changing a variable from a string to a float repurposing an operation
Polymorphism in object - oriented programming allows different classes to provide different implementations of the same method or operation. Repurposing an operation to behave differently depending on the object type is a form of polymorphism. Hiding class variables is related to encapsulation, creating a new class from an existing one is inheritance, and changing a variable type is type - casting, not polymorphism.
Snap & solve any problem in the app
Get step-by-step solutions on Sovi AI
Photo-based solutions with guided steps
Explore more problems and detailed explanations
repurposing an operation