INTRODUCTION
PROJECT RELATED QUESTIONS
OOPS QUESTIONS INTERVIEW
JAVA QUESTIONS INTERVIEW
SQL INTERVIEW QUESTIONS
HR QUESTIONS
Perfect — since you have a Capgemini interview tomorrow, I’ll give you a
complete explanation of OOPs concepts and then all possible Capgemini
interview questions and answers related to OOPs (both HR and Technical rounds).
Let’s go step by step
OOPs (Object-Oriented Programming System) – Complete Explanation
OOPs is a programming paradigm that focuses on objects rather than procedures or
functions.
Objects represent real-world entities, having data (attributes) and behaviors
(methods).
Main Concepts of OOPs
Example (Python / Java-
Concept Explanation
style)
Blueprint or template that
class Car: def __init__(self,
1. Class defines the structure (data +
color): [Link] = color
behavior) of an object.
Instance of a class that
2. Object car1 = Car("Red")
actually holds data.
Wrapping of data and methods
3. into a single unit (class). Private variables: _name,
Encapsulation Protects data from direct __salary
modification.
Example (Python / Java-
Concept Explanation
style)
Hiding internal implementation
Using interfaces or abstract
4. Abstraction and showing only the
classes.
necessary features.
One class acquires properties
5. Inheritance and behaviors of another class. class ElectricCar(Car):
Promotes code reusability.
Same function name but
6. Method
di erent behavior depending
Polymorphism overloading/overriding
on context.
A special method that __init__ in Python /
7. Constructor
initializes an object. Constructor() in Java
Method that cleans up when
8. Destructor __del__() in Python
object is deleted.
Detailed Example
class Animal:
def speak(self):
return "Animal Sound"
class Dog(Animal):
def speak(self):
return "Bark"
# Polymorphism
def make_sound(animal):
print([Link]())
a = Animal()
d = Dog()
make_sound(a) # Animal Sound
make_sound(d) # Bark
Here:
Dog inherits from Animal → Inheritance
speak() behaves di erently → Polymorphism
Data/methods inside a class → Encapsulation
You use speak() without knowing inner logic → Abstraction
Common OOPs Interview Questions for Capgemini (with Answers)
1. What is OOPs?
Answer:
OOPs stands for Object-Oriented Programming System. It organizes a program into
objects that combine data and behavior. The main principles are Encapsulation,
Abstraction, Inheritance, and Polymorphism.
2. What is the di erence between Class and Object?
Answer:
Class is a blueprint or template.
Object is an instance of that class created at runtime.
Example:
Car is a class, and car1 = Car() is an object.
3. Explain Encapsulation with example.
Answer:
Encapsulation is the process of bundling data and methods into a single unit. It
hides data from the outside world.
Example:
class Student:
def __init__(self, name):
self.__name = name # private
def getName(self):
return self.__name
You cannot access __name directly.
4. What is Abstraction?
Answer:
Abstraction hides complex implementation and exposes only the required
functionality.
Example: You use a “mobile phone” to call — you don’t know the inner electronics.
5. What is Inheritance? Types of Inheritance.
Answer:
Inheritance allows one class to derive from another, reusing code.
Types: Single, Multilevel, Multiple, Hierarchical, Hybrid.
6. What is Polymorphism?
Answer:
Polymorphism means “many forms.”
It allows the same function or operator to behave di erently.
Example: Method overriding (Dog and Cat classes both have speak()).
7. What is Method Overloading and Overriding?
Answer:
Overloading: Same method name, di erent parameters (Compile time).
Overriding: Subclass defines the same method as the parent class (Runtime).
8. What is Constructor?
Answer:
A special method that is automatically called when an object is created. Used to
initialize variables.
Example:
class Car:
def __init__(self, model):
[Link] = model
9. What is the di erence between Abstraction and Encapsulation?
Aspect Abstraction Encapsulation
Focus Hides complexity Protects data
Using abstract classes, Using private/protected
Implementation
interfaces variables
Mobile phone hides internal
Example Data hidden in class
logic
10. What is the use of ‘self’ keyword (in Python) or ‘this’ keyword (in Java)?
Answer:
It refers to the current instance of the class.
Used to access class variables and methods.
11. Can you achieve multiple inheritance in Java / Python?
Python: Yes
Java: No (only through interfaces)
12. What is the di erence between procedural and object-oriented
programming?
Procedural Object-Oriented
Based on functions Based on objects
Procedural Object-Oriented
Data and functions separate Data and functions combined
C language Java, Python, C++
13. What are access modifiers?
Answer:
They define the visibility of class members.
Public: accessible everywhere
Private: accessible within class
Protected: accessible in subclass
14. What is a destructor?
Answer:
Destructor is a method called when an object is deleted or goes out of scope, used
to free resources.
In Python → __del__(), in Java → Garbage Collector.
15. What is Object Cloning?
Answer:
Creating a duplicate copy of an object with the same data but separate memory
reference.
Capgemini Technical Interview Tips (OOPs Section)
Prepare examples from your project (Growlytics) showing how you applied
OOPs:
Example:
“In my Growlytics project, I used OOPs principles to design modular code. Each
service like CropRecommendation, FertilizerRecommendation, and PestDetection
was designed as a separate class, making it reusable and maintainable.”
Be ready for:
Explaining code you wrote
Explaining how you structured your ML models (class-based modularity)
Writing small code snippets (like inheritance or polymorphism)
HR + Technical Mix Questions at Capgemini
Question Sample Answer
OOPs helps in modularity, code reusability, and
Why OOPs is important in
maintainability — which is essential for large projects
software development?
like enterprise applications.
I used encapsulation and inheritance — each module
Which OOP concept did
was a separate class, inheriting common functions
you use in your project?
like data preprocessing and prediction.
What’s the real-life
A “vehicle” can be a car, bike, or truck — each
example of
implements “move()” di erently.
polymorphism?
Would you like me to also include DBMS + SQL + Core Java questions that are
frequently asked along with OOPs in Capgemini interviews (for a combined
technical prep sheet)?
It’ll give you everything you need for tomorrow’s round in one place.