Page 96 - DCAP404 _Object Oriented Programming
P. 96
Unit 4: Classes and Objects
Notes
Revit is, therefore, considered an integrated building industry solution model, they say.
However, this change engine modeller is found to be more economical for large projects
since such projects require careful organisation and management.
What about the others? This is left to be seen, considering the number of project developers
who operate on a very small scale in India.
With the evolution of this design technology, all buildings could, in course of time, be
represented as databases, not drawings! Just wait and see although it can take a long time
coming... .
4.6 Summary
A class represents a group of similar objects. A class in C++ binds data and associated
functions together.
It makes a data type using which objects of this type can be created. Classes can represent
the real-world object which have characteristics and associated behavior.
While declaring a class, four attributes are declared: data members, member functions,
program access levels (private, public, and protected,) and class tag name.
While defining a class its member functions can be either defined within the class definition
or outside the class definition. The public member of a class can be accessed outside the
class directly by using object of this class type.
Private and protected members can be accessed with in the class by the member function
only. The member function of a class is also called a method. The qualified name of a class
member is a class name: : class member name.
A global object can be declared only from a global class whereas a local object can be
declared from a global as well as a local class.
The object are created separately to store their data members. They can be passed to as
well as returned from functions. The ordinary members functions can access both static as
well as ordinary member of a class.
4.7 Keywords
Class: Represents the real-world objects which have characteristics and associated behaviour.
Global Class: A class whose definition occurs outside the bodies of all functions in a program.
Objects of this class type can be declared from anywhere in the program.
Local Class: A class whose definition occurs inside a function body. Objects of this class type can
be declared only within the function that defines this class type.
Private Members: Class members that are hidden from the outside world.
Public Members: Class members (data members and member functions) that can be used by any
function.
Temporary Object: An anonymous short lived object.
LOVELY PROFESSIONAL UNIVERSITY 89