0% found this document useful (0 votes)
8 views

Object Oriented Programming CheatSheet -

Uploaded by

wbmsheikh
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Object Oriented Programming CheatSheet -

Uploaded by

wbmsheikh
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

10/17/24, 5:54 PM Object Oriented Programming CheatSheet - by Love Babbar

Resources: 2

Overview 8

Difference between Structure & Class ?

Similarities between Structure & Class ? When to use Structure over Class ?

Public

Private
Access Modifiers
Protected

Friend Protected Friend

Inside Class Function Inline Keyword


Member Function
Outside Class Function Scope resolution operator

Default Constructor

Parameterised Constructor

What is Deep/Shallow Copy ?


Copy Constructor
Copy Constructor vs Assignment Operator
What is a Class ?
What is Constructor ?
Virtual Constructor

Virtual Copy Constructor

How constructors are different from a normal member


function?

Can we have more than one constructor in a class? Constructor Overloading

Private Destructor

Virtual Destructor

Pure Virtual Destructor

How destructors are different from a normal member


Destructor
function?

Can there be more than one destructor in a class?

When do we need to write a user-defined destructor?

Can a destructor be virtual? when to use it ?

What is an Object ? Class vs Object

Real world analogy of Class and Object ?

Static keyword Why it is used ?

Virtual Keyword Why it is used ?

Abstract Keyword Why it is used ?

Final Keyword Why it is used ?

Important Keywords: Explicit keyword Why it is used ?

this keyword Why it is used ?

new keyword Why it is used ?

const keyword Why it is used ?

super keywork Why it is used ?

what ?

Need ?

Compile-time Polymorphism

Function/Operator Overloading what function cannot be overloaded in C++ ?


categorisation
What are all the operators that cannot be overloaded?

Function Overriding Runtime Polymorphism

Virtual Function
Polymorphism
Virtual Class

Derived Class

Can Virtual Function be set "Private" ?

Inline Virtual Function

Abstract Class

Pure Virtual Function

Pure Virtual Destructor


Pillar of OOPS
Sub Class

What is inheritance ? Super Class

Reusability

why/ Need of Inheritance ?

Can Object Oriented Programming exist without


Inheritance ?

Single Inheritance.

Multiple Inheritance.

Types of Inheritance Hierarchical Inheritance.

Multilevel Inheritance.
Object Oriented Programming
2 what you can expect from this ?
CheatSheet - by Love Babbar Hybrid/Virtual Inheritance

Real Life Example of Multiple Inheritance.

What are the limitations of inheritance?

What is Sealed Modifier ?


Features of OOPS:
Inheritance
How can we call the base method without creating an
instance?

What is the difference between new and override?

Why Java Does not support Multiple Inheritance ?

What is diamond problem in case of multiple inheritance


in java?

If Class A inherits from Class B, then what all is inherited


Explore Every Combination HOMEWORK
from Parent class ?

Object Slicing

how to hide base class methods/functions ?

Friend Function/ Friend Class/ Inline Function Examples Homework

Local Class/ Nested Class/ Simulating Final Class Homework

Does Overloading works with Inheritance ?

Difference Between Polymorphism & Inheritance

Generalisation vs Aggregation vs Composition

what ? Combo of Data-hiding & Abstraction

Advantages/Need ?

Encapsulation how to achieve ?

Code/implementation Example

Real World Example

what? Implementation hiding

When to use ?

Access Specifiers
C++
header Files
How to achieve ?
Abstraction:
Interfaces
Java
Abstract Classes

Encapsulation vs Abstraction Example

What are the differences between interfaces and abstract


classes?

Dynamic Binding

Message Passing

Design a hash map

Design an LRU cache

Design a call center


Object-oriented design interview questions
Design a deck of cards

Design a parking lot

Design an online chat

C vs C++ vs Java

Difference between procedural programming and OOPs?

Why Java is not a Purely Object Oriented Language ?

Is an array a primitive type or an object in Java?

What is early and late Binding?

What is the default access modifier in a class?

How many instances can be created for an abstract class?

Define Garbage collection?, how does it work

Define manipulators?

What do you mean by finally block?

What is a final variable?

Misc:
What is meant by an exception?

Is an error basically the same as an exception?

Exception handling ? Try-Catch Block

What is the method ‘finalize’ used for?

What is a token? Examples ?

What are the three arguments of a ternary operator?

Describe the concept of Enum?

Basic understanding of Design Patterns Singleton pattern Example ?

Is it possible for a class to inherit the constructor of its


Homework
base class?

When should I use a struct instead of a class?

Cohesion vs Coupling

https://whimsical.com/object-oriented-programming-cheatsheet-by-love-babbar-YbSgLatbWQ4R5paV7EgqFw 1/1

You might also like