What is Class and Object


Class & Object



1. class
    1.1 A class is a blueprint for the object.
    1.2 Define by using keyword: class
    1.3 Member of class
                1.3.1 Data Members
                1.3.2 Member Function/Method
    1.4 Access mode of members of class
                1.4.1 private
                1.4.2 public
                1.4.3 protected
2. object
    2.1 Identifiable entity
    2.2 it has features that span a local state space.
    2.3 It has operations that can change the statu of the system locally, while also inducing operations in peers object
    2.4 It refers to a thing, either a tangible or a mental construct, which is identifiable by users of the
           target system.

Declaration & Definition of Class

 Syntax
class class_name
{
                access_mode:
                                data_member
                access_mode:
                                member_function()
};
main()
{
                class_name object_name;
                object_name.member_function();
}

Post a Comment

0 Comments