212-15-4173(Forum 1 Solution)

212-15-4173(Forum 1 Solution)

by Arpita sarker -
Number of replies: 0

ANS TO THE Q NO:-1

Differentiate between class and object in OOP:-

Class: A class is a template used for the creation of objects. An object is an instance of a class. While a class is a logical entity, an object is a physical entity. Each object has a state in which all the member variables have specific values.

        ANS TO THE Q NO:-2

Object − Objects have states and behaviors. Example: A dog has states - color, name, breed as well as behaviors – wagging the tail, barking, eating. An object is an instance of a class. Class − A class can be defined as a template/blueprint that describes the behavior/state that the object of its type support.