For training related to .net,OOPS,design patterns, MVC,WCF and .net fundamentals
contact at sukeshmarla@gmail.com or Click Here

Click here for my training feedbacks

Followers

Follow Us



Share your Interview questions here


For software development queries contact SukeshMarla@Gmail.com

Follow by Email

Learn everything about MSBI

25 October 2010

OOPS Part1-Classes

  • Objects with similar properties and methods are grouped together to form a Class. Thus a Class represent a set of individual objects or in short we can say class is a template or an bluprint from which we can create objects.
  • Characteristics of an object are represented in a class as Properties . The actions that can be performed by objects becomes functions of the class and is referred to as Methods.
        For example: Consider we have a Class of Cars under which Santro Xing, Alto and WaganR represents individual Objects. In this context each Car Object will have its own, Model, Year of Manufacture, Colour, Top Speed, Engine Power etc., which form Properties of the Car class and the associated actions i.e., object functions like Start, Move, Stop form the Methods of Car Class.
  • No memory is allocated when a class is created. Memory is allocated only when an object is created, i.e., when an instance of a class is created.