Step 1: Understanding functions and methods in Object-Oriented Programming.
In Object-Oriented Programming (OOP), methods are functions that are associated with a class. These methods define the behavior of objects created from that class. In many situations, a programmer may want to perform similar operations using the same method name but with different types or numbers of parameters.
Step 2: Concept of Method Overloading.
Method Overloading is a feature of object-oriented programming that allows multiple methods to have the same name but different parameter lists within the same class. The difference may be in the number of parameters, type of parameters, or order of parameters.
This helps improve code readability and reusability because the same method name can perform different operations depending on the input arguments.
For example, a method named add() can be used to add two integers, three integers, or two floating point numbers depending on the parameters provided.
Step 3: Analysis of the options.
(A) File overloading: Incorrect. This is not a recognized concept in object-oriented programming.
(B) Object overloading: Incorrect. This term is not used in OOP terminology.
(C) Class overloading: Incorrect. Classes themselves are not overloaded.
(D) Method overloading: Correct. It allows multiple methods with the same name but different signatures within a class.
Step 4: Conclusion.
Therefore, the feature that allows multiple methods with the same name but different signatures in a single class is called Method Overloading.
Final Answer: Method overloading