1 / 28

OOP'S AND DESIGN

SEMINAR ON. OOP'S AND DESIGN. CONTENT. INTRODUCTION. FEATURES OF OOP. ORGANIZATION OF DATA & FUNCTION IN OOP. OOP’S DESIGN. DESIGN OF MEMBER FUNCTION. ANALISYS OF OOP. BENEFITS OF OOP. INTRODUCTION.

Download Presentation

OOP'S AND DESIGN

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. SEMINAR ON OOP'S AND DESIGN

  2. CONTENT INTRODUCTION. FEATURES OF OOP. ORGANIZATION OF DATA & FUNCTION IN OOP. OOP’S DESIGN. DESIGN OF MEMBER FUNCTION. ANALISYS OF OOP. BENEFITS OF OOP.

  3. INTRODUCTION

  4. Object-oriented programming (OOP) now dominates the procedural-programming paradigm in many application areas. Developers often choose OOP and scripting languages—such as C++, Java for project implementations because these languages provide a way to form appropriately realistic models of real systems and processes. Actually, avoiding OOP technology may produce less-than-optimal designs and deny the development team the opportunity to code in a more intuitive fashion. Here's a list of some of the most interesting topics in OOP development:

  5. What is OOPs? Object-Oriented programming as an approach that provide s a way of modularizing programs by creating partititioned memory area for both data and functions that can be used as templates for creating copies of such modules on demands.

  6. ORGANISATION OF DATA AND FUNCTION IN OOP’S: Object A Object B The major motivating factor in the invention of object oriented approach is to remove some of the flows encountered in the procedure approach. OOP treats data as a critical element in the program development and does not allow it to flow freely around the system. Data Data Communication Functions Functions Object C Functions Data

  7. Some of the striking features of OOP are: Programs are divided into what are know as objects. Functions that operate on the data of an object are tied together in the Data Structure. Data is hidden and cannot be accessed by external functions. Objects may communicate with each other through functions. New data and functions can be easily added whenever necessary. Follows bottom-up approach in program design.

  8. BASIC CONCEPT OF OOP’S It is necessary to understand some of the concepts used extensively in OOP. Object . Classes. Data Abstraction and Encapsulation. Inheritance. Polymorphism. Dynamic Binding. Message Communication.

  9. OBJECT: Objects are the basic run-time entities in an Object -Oriented System.They may represent a person, a place, a bank account or any item that the program has to handle. When a program is executed, the objects interact by sending messages to one another. CLASSES:A class is thus a collections of objects of similar type. For example, mango, apple,and orange are members of the class fruit. Class are user-defined data type and behave like the built-in type of a programming language. If fruit has been defined as a class, then the statement fruit mango; Will create and object mangobelonging to the fruit.

  10. DATA ABSTRACTION & ENCAPSULATION The wrapping up of data and functions into a single unit (called class) is known as encapsulation. Data Encapsulation is the most striking feature of a class. The data is not accessible to the outside world, and only those functions which are wrapped in the class can access it. These functions provide the interface between the objects data and the program. This insulation of the data from direct access by the program is called data hiding or information hiding. Since the classes use the concept of data abstraction, they are known as Abstract Data Type(ADT).

  11. INHERITANCE:Inheritance is the process by which object of one class acquire the properties of object of another class. It supports the concept of hierarchical classification.

  12. ANOTHER EXAMPLE

  13. POLYMORPHISM:Polymorphism is another important OOP’s concept. Polymorphism, a Greek term, means the ability to take more than one form. An operation may take exhibit different behaviors in different instances. The process of making an operator to exhibit different behaviors in different instance is known as operator overloading. Using a single function name to perform different types of tasks is known as function overloading.

  14. Function over loading

  15. DYNAMIC BINDING: Binding refers to the linking of procedure call to the code to be executed in response to the call. Dynamic binding(Also known as late binding) means that the code associated with a given procedure call is unknown until the time of call at run-time. It is associated with polymorphism.

  16. Message communications: An object-oriented program consists of a set of object that communicate with each other. It involves three steps • creating classes that defined objects. • creating objects from class definition. • Establishing communication among objects.

  17. Object 1 Object 2 Object 5 Object 4 Object 3 Network of objects communicating between them.

  18. STEPS IN OBJECT-ORIENTEDDESIGN: Design is concerned with the mapping of objects in the problem space into objects in the solution space, and creating an overall structure and computational model of the system. The object oriented design(OOD) approach may involve the following steps. A review of object created in the analysis phase. Specification of class dependencies. Organization of class hierarchies. Design of class.

  19. 1.Review of Problem Space Objects: An exercise to review the objects identified in the problem space is undertaken as a first step in the design stage. Some guidelines that might help the review process are: If only one object is necessary for a service (or operation), then it operates only on that object. If two or more objects are required for an operation to occur, then it is necessary to identify which object’s private part should be known to the operation. If an operation requires knowledge of more than one type of objects, then the operation is not functionally cohesive and should be rejected.

  20. 2.Class Dependencies: Analysis of relationships between the classes is central to the structure of a system. Therefore, it is important to identify appropriate classes to represent the objects in the solution space and establish their relationships. The major relationships that are important in the context of design are: Inheritance relationships. Containment relationships. Use relationships.

  21. 3.Organization Of Class Hierarchies: Organization in the class hierarchy involve identifications, attributes and functions among a group of related classes and the combining them to form a new class. A new class will serve as the super class and the other as subordinate classes, The new class may or may not have the meaning of an object by itself. If the object is created purely to combine the common attributes it is called anabstract class.

  22. A B C D E (a) Objects in solution spaces X Y A B C D E (b) First level of hierarchy

  23. Z X Y A B C D E (c) Second level of hierarchy

  24. 4.Design of Class We have identified classes, their attributes, an minimal set of operations required by the concept a class is representing. We must look at the complete details the each classes represents. The important issue is to decide word functions are to be provided. Some guidelines of designing of class: The public interface of a class should have only functions of the class. An object of one class should not send a message directly to a member of another class. A class should dependent on as few classes as possible. Interaction between two classes must be explicit.

  25. DESIGN OF MEMBER FUCNTION: We have to identified. Class and object. Data member function. Interface. Dependencies and . Class hierarchy.

  26. BENEFIT OF OOP: Object-orientation contributes to the solution of many problems associated with the development and quality of software products. The principal advantages are Through inheritance we can eleminate redundant code and extend the use of existing. Classes . The principle of data hiding helps the programmer to built secure that can not be invaded by code in other part of the program. Object-oriented system can be easily upgraded from small to large system. Software complexity can be easily managed .

  27. Thanking you...

  28. Any Question ?

More Related