Class : Class is the 1st OOPs concept .Class defines the characteristics of objects which includes its attributes , fields properties and behavior . Let us say we have a class called car , then the color , model number , top speed can be its attributes and properties . Accelerating , breaking , turning will be its behavior Objects: Objects can be considered as a thing that performs a set of related functions .Programming objects are used to model real worlds objects. An object is also an instant of a class . For our class Car , Ferrari will be our object Instance : One can have an instance of a class; the instance is the actual object created at runtime. The set of values of the attributes of a particular object is called its state. The object consists of state and the behaviour that’s defined in the object’s class. Method :Also called as functions in some programming languages , methods defines the behavior of particular objects . For our Car class , turning() , breakin
Comments
Post a Comment