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

Introduction-to-Classes-and-Objects

Class and object

Uploaded by

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

Introduction-to-Classes-and-Objects

Class and object

Uploaded by

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

Introduction to Classes

and Objects
This presentation will provide a foundational understanding of classes and
objects, key concepts in object-oriented programming.

by Tasmiya Rangrej
What is a Class?
A class acts as a blueprint or template for creating objects.

Data Structure Functions


It defines the attributes or properties of the object. It specifies the methods or behaviors that the object can
perform.
Defining a Class
Classes are defined using keywords like 'class' and 'def' depending on the
programming language.

Class Name Attributes


A meaningful name that reflects Variables that store data related
the purpose of the class. to the object.

Methods
Functions that define the object's behavior.
Instantiating Objects
An object is created from a class using the 'new' keyword or similar syntax.

Object Creation Memory Allocation


The process of generating an Space is reserved in memory for the
instance of a class. object's data and functions.
Accessing Object Properties and Methods
Object properties and methods are accessed using the dot operator.

Object Name
1
The name given to the instantiated object.

Dot Operator
2
Used to access the object's properties and methods.

Property or Method Name


3
The specific attribute or function to be accessed.
Difference between
Class and Object
A class is like a blueprint, and an object is an instance of that blueprint.

1 2
Class Object
Defines the structure and behavior of A specific instance of a class with its
an object. own set of data.

You might also like