Professional Documents
Culture Documents
Ashutosh Jha,
Technical Officer,
C-DAC Patna
28/03/2023 1
Agenda
● Introductions
● Classes and Objects
● Reference Variables and Methods
● Constructors
● Static Methods vs Instance Methods
● Reference variables as Instance of Member of the
class
● String
● END
2
Introductions
3
Four Pillars of Object-Oriented Programming
4
Classes and Objects
5
Benefits of Object-Oriented Programming
6
Reference Variables
7
Example
8
Reference Methods
9
Example
10
Constructors
11
Default Constructor
class Person {
constructor() {
this.name = "John";
this.age = 30;
}
}
14
Instance Method
17
Write your own program
18
Write your own program
19
Recap
20
End of Session, Now What to do?
21
Questions
28/3/2023 23