OVERLOADING IN HIGH-LEVEL LANGUAGES LIKE CPP, JAVA , PYTHON IS NOT ONLY LIMITED TO FUNCTIONS BUT ALSO OPERATORS LIKE ARTHIMETIC , ASSIGNMENT OR STREAM OPERATORS .
THIS MEANS THESE OPERATORS USAGE IS NOT CONFINED TO ONLY THE BUILT-IN TYPES BUT ALSO USED ON CUSTOM CLASSES OR ENUMERATIONS .
NOW OVERLOADING THESE OPERATORS CAN MAKE IT EASIER TO ACCESS THESE OPERATORS IN USER DEFINED CLASSES OR ENUMERATIONS.
( EX : IN A STRING CLASS , + OPERATOR CAN BE OVERLOADED TO PERFORM CONCATENATION OPERATION )
OPERATOR OVERLOADING CAN MAKE IT EASIER TO PERFORM OPERATIONS ON THE OBJECTS OF USER DEFINED CLASSES . AND THUS MAKE THE CODE MORE ROBUST.
BUT ONE SHORT-COMING OF THESE APPROACH IS IT MAKES THE CODE COMPLICATED IN CASE OF LARGE CLASS DEFINATIONS,
Get Answers For Free
Most questions answered within 1 hours.