1 / 18

A Survey of Object-Oriented Concept

Explore essential concepts in object-oriented programming languages, including reusability, object types, concurrency, and more. Learn about instantiation, object classes, inheritance, polymorphism, and generic classes. Understand the significance of object management and programming environments in OO systems.

jkruger
Download Presentation

A Survey of Object-Oriented Concept

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. A Survey of Object-Oriented Concept Oscar Nierstrasz

  2. 1.1 What is Object-Oriented Programming Language • Restrictive – The programming language that supports both object classes and class inheritance. • Loose - Any programming language that provides mechanisms that can be used to exploit encapsulation is (at least to some degree) object-oriented.

  3. Object models for programming languages often encapsulate objects in terms of a set of operations as a visible interface, while hiding the object’s realization.

  4. Our Discussion will center on: • 1.1.1 Reusability • 1.1.2 Object types • 1.1.3 Concurrency

  5. 1.1.1 Reusability • Instantiation • Object Classes • Inheritance • Polymorphism • Overloading • Generic Classes

  6. Instantiation • Instantiation is perhaps the most basic OO reusability mechanism. • There are static and dynamic instantiation. • Statically instantiated objects are allocated at compile time and exist for the duration that the program executes. • Dynamically instantiated objects require run-time support for allocation and for either explicit deallocation or some form of garbage collection.

  7. Instantiation • One way for programmers to define and instantiate their own objects is providing the programmer with a facility to define object classes. • An alternative approach to instantiation is to use prototypical objects.

  8. Object Classes • An object class specifies a set of visible operations, a set of hidden instance variables, and a set of hidden methods that implement the operations. • The difference between object classes and prototypical objects is brought out sharply when viewed in terms of applicable inheritance mechanisms.

  9. Inheritance • In most cases, inheritance is strictly a reusability mechanism for sharing behavior between objects. • Inheritance can be statically or dynamically. • Class inheritance is often represented as the fundamental feature that distinguishes object-oriented from other programming languages. • Single inheritance • Multiple inheritance. • Dynamic inheritance refers to mechanisms that permit objects to alter their behaviour in the course of normal interactions between objects. • Part inheritance. • Scope inheritance.

  10. Some interesting points concering class inheritance • Not all languages with class inheritance support multiple inheritance. • It is important to be able to override inherited methods • Subclass may or may not be permitted direct access to inherited instance variables. • The issue of name clashes in teh presence of multiple inheritance.

  11. Polymorphism and overloading • A polymorphic function is one that can be applied uniformly to a variety of objects. • Class inheritance is closely related to polymorphism. • Polymorphism enhances software reusability by making it possible to implement generic software that will work not only for a range of existing objects, but also for objects to be added later.

  12. Generic classes • Generic object classes achieves software reusability by partially describing a class and parameterizing the unknowns. • Two basic categories of generic object: • Container objects: arrays and lists. • Tool objects: sorters and editors. • In case of tool objects, the parameter must be constrained to indicate the required parent class of the parameter.

  13. 1.1.2 Object types • An object type is superficially the same thing as an object class. The difference is that when we manipulate typed objects, we can make static type-checking. • The declared types of a varibles and of arguments to operations serve as specification for balid bindings and invocations. • In the presence of dynamic binding, it is generally impossible to determine statically the class of a variable, but with teh appropriate type rules we can still perform type-checking.

  14. 1.1.3 Concurrency • Two ways in which programing languages have dealt with concurrency and communication. • Active entities (process)communicate indirectly through shared passive objects. • Active entities communicate directly with one another by message passing.

  15. 1.2 OO systems • Two important kinds of OO system • Those that provide run-time support for OO application. • Those that form an environment for OO software development.

  16. 1.2.1 Object Management • Object management refers to a mixed bag of run-time issues such as concurrency, distribution, version control and security. • Minimal object management support is provided for C++ objects. • Smalltalk and LISP additionally provide fro automatic garbage collection. • Object-Oriented Operating system may provide support for persistence, reliable communication, ro distributed object-naming at a low level. • OO database.

  17. 1.2.2 OO programing Environment • This is about tools and environments for application development. • First problem is how should we decompose our application into objects in such a way as to best exploit the OO pradigms available to us? (consept model techniques) • The next problem is that of selecting objects from a software base (personal expertise, software document, and browsing tools). • Third problem is to cope with evolution of software base (making interface unchanged)

  18. Summary • The term Object-oriented is best interpreted as referring to any approach that exploits encapsulation or packaging in the process of designing and building software. • We have surveyed OO techniques in programing languages and system support.

More Related