Saturday, January 14, 2012

Object Oriented Concepts-03


Question:        What is OOP?
Answer:          The object oriented programming is commonly known as OOP. Most of the languages are developed   using    OOP    concept.   Object-oriented    programming    (OOP)   is    a programming concept that uses "objects" to develop a system. An object hides the implementation details and exposes only the functionalities and parameters it requires to its client. Here also an object shares the same concept as that of a bike. While driving a motor bike, we are unaware of its implementation details such as how it is developed, internal working of gears etc.? We know only the functions or actions it can perform.
Question:        What are the various elements of OOP?
Answer:          Various elements of OOP are: Object Class Method Encapsulation Information Hiding
Inheritance Polymorphism
Question:        What are the characteristics of Object Oriented programming language?
Answer:          Some key features of the Object Oriented programming are: Emphasis on data rather than procedure Programs are divided into entities known as objects Data Structures are designed such that they characterize objects Functions that operate on data of an object are tied together in data structures Data is hidden and cannot be accessed by external functions  Objects  communicate  with  each  other  through  functions  New  data  and functions can be easily added whenever necessary Follows bottom up design in program design
Question:        What are the basic Concepts used in the Object-Oriented Programming language?
Answer:          Object Class Data Abstraction and Encapsulation Polymorphism Inheritance Message passing Dynamic binding
Question:      What Is An Object? (Object-Oriented Technology)
Answer:        There are many definitions of an object, such as found in [Booch 91, p77]: "An object has state, behavior, and identity; the structure and behavior of similar objects are defined in their common class; the terms instance and object are interchangeable". This is a "classical languages" definition, as defined in [Coplien 92, p280], where "classes play a central role in the object model", since they do not in prototyping/delegation languages. "The term object was first formally applied in the Simula language, and objects typically existed in Simula programs to simulate some aspect of reality" [Booch 91, p77]. Other definitions referenced  by Booch include  Smith  and  Tockey:  "an object represents  an  individual, identifiable item, unit, or entity, either real or abstract, with a well-defined role in the problem domain." and [Cox 91]: "anything with a crisply defined boundary" (in context, this is "outside the computer domain". A more conventional definition appears on pg 54). Booch goes on to describe these definitions in depth. [Martin 92, p 241] defines: "An "object" is anything to which a concept applies", and "A concept is an idea or notion we share that applies to certain objects in our awareness". [Rumbaugh 91] defines: "We define an object as a concept, abstraction or thing with crisp boundaries and meaning for the problem at hand." [Shlaer 88, p 14] defines: "An object is an abstraction of a set of real- world things such that:
Question:        What Is Object Encapsulation (Or Protection)?
Answer:          [Booch 91, p. 45] defines: "Encapsulation is the process of hiding all of the details of an object that do not contribute to its essential characteristics." [Coad 91, 1.1.2] defines: "Encapsulation (Information Hiding). A principle, used when developing an overall program structure, that each component of a program should encapsulate or hide a single design decision... The interface to each module is defined in such a way as to reveal as little as possible about its inner workings. [Oxford, 1986]" Some languages permit arbitrary access to objects and allow methods to be defined outside of a class as in conventional programming. Simula and Object Pascal provide no protection for objects,

meaning instance variables may be accessed wherever visible. CLOS and Ada allow methods to be defined outside of a class, providing functions and procedures. While both CLOS and Ada have packages for encapsulation, CLOS's are optional while Ada's methodology clearly specifies class-like encapsulation (Adts). However most object- oriented languages provide a well defined interface to their objects thru classes. C++ has a very general encapsulation/protection mechanism with public, private and protected members. Public members (member data and member functions) may be accessed from anywhere. A Stack's Push and Pop methods will be public. Private members are only accessible from within a class. A Stack's representation, such as a list or array, will usually be private. Protected members are accessible from within a class and also from within subclasses (also called derived classes). A Stack's representation could be declared protected allowing subclass access. C++ also allows a class to specify friends (other (sub)classes and functions), that can access all members (its representation). Eiffel 3.0 allows exporting access to specific classes.





Please Share it! :)

Ditulis Oleh : Nangraj Hari: 7:50 AM Kategori:

0 comments:

Post a Comment

 
PLEASE VISIT MY OTHER BLOG TO DOWNLOAD LATEST FULL CRACKED SOFTWARES,GAMES,COMPUTER NOTES,VIDEO TUTORIALS,AND MUCH MORECLICK HERE