Classes & Objects

September 10th, 2006 Admin Posted in Classes & Objects No Comments »

  • Class is a template for an object.
  • Object is an instance of a class.
  • Class Declaration syntax.

Instance variables(data,fields)
Methods(functions)

  • Object Declaration syntax.

References (They are similar to pointers which we cannot manipulate).
Object

  • Naming conventions[optional]
  • class names should be descriptive with first letter of each word capitalized.
  • Field names should be in mixed case ie first letter lower and subsequent words upper.
  • Method names should be descriptive and mixed case like fields.
  • local variables and parameters,are should be represented in lower case.
  • Memory management scheme for objects ,references and garbage collector.
  • Data instance default initializations.
  • Method overloading.(polymorphism) this keyword.
  • Constructors and their overloading.
  • Passing and returning objects.
  • pass-by-value and pass-by-reference.
  • Garbage collector(destructor)
  • StaticĀ  and final keywords
  • Command line arguments
AddThis Social Bookmark Button

Classes & Objects

September 10th, 2006 Admin Posted in Classes & Objects No Comments »

Classes & Objects

Class

A class is a blueprint or template from which the object is actually made.

A class is a user defined data type that containsĀ  data and methods that operate on the data.

Object

An object is an entity. It is an instance of the class.

AddThis Social Bookmark Button