मराठी
महाराष्ट्र राज्य शिक्षण मंडळएचएससी विज्ञान (संगणक विज्ञान) इयत्ता १२ वी

Differentiate classes and objects.

Advertisements
Advertisements

प्रश्न

Differentiate classes and objects.

Differentiate between Class and Object.

Differentiate between an object and a class.

फरक स्पष्ट करा
Advertisements

उत्तर १

Class:

  • A class is a blueprint or template from which objects are created.
  • Class doesn’t allocate memory when it is created.
  • Class is a logical entity.

Object:

  • The object is an instance of a class.
  • Objects allocate memory when it is created.
  • The object is a physical entity.
shaalaa.com

उत्तर २

Basis of Difference Class Object
Meaning A class is a blueprint or template for creating objects. An object is a real instance of a class.
Nature It is a logical definition. It is a physical entity created in memory.
Creation A class is defined using the class keyword. An object is created by calling the class.
Data values It specifies attributes and methods in general. It contains actual values for the attributes.
Example Mobile_phone is a class. Nokia Lumia, Asha and i4 are objects of that class.
shaalaa.com
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
पाठ 13: Introducton to Object Oriented Programming Techniques - Evaluation - Section - B [पृष्ठ २३२]

APPEARS IN

सामाचीर कलवी Computer Science [English] Class 11 TN Board
पाठ 13 Introducton to Object Oriented Programming Techniques
Evaluation - Section - B | Q 2. | पृष्ठ २३२
सीबीएसई Computer Science with Python [English] Class 12
पाठ 2 Concept of Object Oriented Programming
EXCERCISE | Q 3. | पृष्ठ ३७
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×