Info Edge
Mundada Ent & Eye Care Center Interview Questions and Answers
Q1. What do you mean by run time polymorphism and how is it achieved?
Run time polymorphism is the ability of a method to do different things based on the object it is acting upon.
Run time polymorphism is achieved through method overriding in object-oriented programming.
It allows a subclass to provide a specific implementation of a method that is already provided by its superclass.
The actual method that gets called is determined by the type of object at run time.
Example: Animal class has a method 'makeSound'. Dog and Cat classes extend Animal a...read more
Q2. Explain each oops concept with clarity and write a class where you are implementing these.
Explanation of OOPs concepts with a class implementation
Encapsulation: Class with private data members and public methods to access them
Inheritance: Class extending another class to inherit its properties and methods
Polymorphism: Class with multiple methods with the same name but different parameters
Abstraction: Class with abstract methods that must be implemented by subclasses
Q3. How is encapsulation different than abstraction?
Encapsulation is the concept of bundling data and methods that operate on the data into a single unit, while abstraction is the concept of hiding the implementation details and showing only the necessary features of an object.
Encapsulation is about wrapping the data (variables) and methods (functions) that operate on the data into a single unit (class).
Abstraction is about hiding the implementation details and showing only the necessary features of an object.
Encapsulation hel...read more
Q4. Explain OOPS concepts with some code
OOPS concepts are fundamental to object-oriented programming and include inheritance, encapsulation, polymorphism, and abstraction.
Inheritance: Allows a class to inherit properties and behavior from another class. Example: class Dog extends Animal.
Encapsulation: Bundling data and methods that operate on the data into a single unit. Example: private variables and public methods.
Polymorphism: Ability to present the same interface for different data types. Example: method overlo...read more
Q5. palindrome all methods you can think
Various methods to check if a string is a palindrome
Reverse the string and compare with the original string
Iterate through the string from both ends towards the middle
Use a stack to push the characters of the string and then pop them to compare with the original string
Q6. Peak element in array
Peak element in array is the element which is greater than or equal to its neighbors.
Iterate through the array and check if the current element is greater than its neighbors.
If the current element is greater than both neighbors, it is a peak element.
If the current element is at the start or end of the array, only compare with one neighbor.
Q7. Prime number to check
A prime number is a number greater than 1 that can only be divided by 1 and itself.
A prime number is a number greater than 1.
It can only be divided by 1 and itself.
Examples: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29
Interview Process at Mundada Ent & Eye Care Center
Reviews
Interviews
Salaries
Users/Month