Page 59 - DCAP404 _Object Oriented Programming
P. 59
Object-oriented Programming
Notes
Caselet Getting IT Right
VRML
Virtual Reality Modeling Language or Virtual Reality Markup Language is used in creating
3-dimensional objects for a virtual reality environment. For example, it could be used to
create a prototype of moving objects such as the planets in space on a screen. In response
to the mouse click, the VRML objects are triggered to move across the screen and create a
flow of movement.
VRML objects can generate 2D and 3D animation, sound effects and other visual effects
that can be inserted as objects in other interfaces such as HTML and Java programs.
The file extension used for VRML is “.wrl”. VRML is designed to be used on the Internet,
intranets and other local client systems. VRML can be used for engineering and scientific
visualisation, multimedia presentations as well as entertainment and educational titles.
For example, VRML can be used to create 3D designs for auto manufacturers.
It can also combine other commonly used 3D objects, and translate them to VRML file
format. VRML objects can be reused without having to be recoded.
OOP
Object Oriented Programming is a technique that considers methods and data as objects.
Other techniques such as process-oriented models deal with methods and data as
independent entities, whereas OOP emphasises the packing of methods and data together.
T he method is a set of instructions that is are executed on the given data to achieve a result.
For example, in a program which adds two numbers and prints the result, the method is
addition and data is the input of 2 numbers.
In OOP the objects can be reused. In the OOP technique the methods are wrapped together
in a container called class and used whereever the program requires it. A class contains the
definition of how the objects should behave. OOP manages complexity by way of
inheritance, encapsulation and polymorphism.
Encapsulation is the wrapping of both methods and data together as an object. The object
is protected to prevent manipulation by other parts of the program.
When an object acquires the properties of another object, i.e., an object obtains the properties
of all the methods and interfaces for execution that are created in another object, it is called
inheritance.
Polymorphism implies that the same interface can be used for different classification of
uses. An example of polymorphism is when a set of information has to be modified in
three different files viz, inserting into file number one, changing the contents in file 2 and
deleting the information in file 3.
The OOP technique works best when encapsulation, inheritance and polymorphism are
combined and work together. Some of the popular versions that are available in market
are C++, Java, etc.
Accelerator Board
The accelerator board is an additional fit-in for the motherboard to boost the speed of the
computer. The motherboard will have a socket to insert any CPU or FPU (floating
Contd...
52 LOVELY PROFESSIONAL UNIVERSITY