English

Differentiate classes and objects.

Advertisements
Advertisements

Questions

Differentiate classes and objects.

Differentiate between Class and Object.

Differentiate between an object and a class.

Distinguish Between
Advertisements

Solution 1

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

Solution 2

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
  Is there an error in this question or solution?
Chapter 13: Introducton to Object Oriented Programming Techniques - Evaluation - Section - B [Page 232]

APPEARS IN

Samacheer Kalvi Computer Science [English] Class 11 TN Board
Chapter 13 Introducton to Object Oriented Programming Techniques
Evaluation - Section - B | Q 2. | Page 232
CBSE Computer Science with Python [English] Class 12
Chapter 2 Concept of Object Oriented Programming
EXCERCISE | Q 3. | Page 37
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×