The document discusses abstraction, which is a fundamental concept of object-oriented design. Abstraction involves focusing on an object's essential characteristics and behavior while hiding implementation details. There are different types of abstractions from most useful to least useful. Effective abstractions model real-world entities and provide well-defined interfaces through contracts, preconditions, and postconditions. Both static and dynamic properties of objects must be considered.
Introduction of object oriented analysis & design by sarmad balochSarmad Baloch
Introduction of Object oriented Analysis & Design by SARMAD BALOCH
I AM SARMAD KHOSA
BSIT (5TH A)
(ISP)
FACEBOOK PAGLE::
https://www.facebook.com/LAUGHINGHLAUGHTER/
YOUTUBE CHANNEL:::
https://www.youtube.com/channel/UCUjaIeS-DHI9xv-ZnBpx2hQ
The document provides an overview of object-oriented analysis and design (OOAD). It discusses key OOAD concepts like iterative development, the Unified Process, UML notation, thinking in terms of objects and their services/responsibilities. It explains the differences between object-oriented analysis, which focuses on identifying domain objects, and object-oriented design, which defines software objects and how they collaborate. The document uses a dice game example to illustrate domain modeling with objects, interaction diagrams to show message flows, and a class diagram to define class attributes and methods.
Object-oriented modeling and design uses objects and classes to model real-world concepts. It promotes better understanding of requirements through analysis, design, and implementation using object-oriented notations and processes. Key characteristics include identity, classification through classes, inheritance for sharing features among classes, and polymorphism where operations behave differently for different classes. Modeling involves creating class, state, and interaction models. Object-oriented themes like abstraction, encapsulation, and inheritance allow for flexibility, reusability, and low maintenance costs.
This document provides an introduction to object-oriented concepts and the Unified Modeling Language (UML). It discusses the basic principles of object orientation including abstraction, encapsulation, modularity, and hierarchy. It then defines key object-oriented terms like class, object, attribute, operation, interface, component, and relationships. It provides examples of how these concepts are represented using UML notation.
This document provides an introduction to object-oriented analysis and design (OOAD). It discusses why the OO approach was developed, including to address issues with communication and managing complexity. It then defines key OO concepts like objects, classes, encapsulation, inheritance, polymorphism, and the use of UML. It also briefly outlines the object modeling technique (OMT) methodology and some popular OO development processes.
1) The document discusses complexity in software systems and the object model approach to managing complexity. Complex software systems have many interrelated parts and long lifespans.
2) The object model approach uses principles like abstraction, encapsulation, modularity, hierarchy and typing to organize a software system. Classes define common structure and behavior for objects.
3) Objects have state, behavior and identity according to their class. Relationships like aggregation and inheritance define relationships among classes and objects.
The document discusses the object oriented analysis process and identifying use cases. It describes identifying actors, developing use cases and interaction diagrams to capture system requirements from the user perspective. It provides guidelines for identifying use cases and actors, and developing effective documentation.
Knowledge representation and reasoning (KR) is the field of artificial intelligence (AI) dedicated to representing information about the world in a form that a computer system can utilize to solve complex tasks such as diagnosing a medical condition or having a dialog in a natural language
Introduction of object oriented analysis & design by sarmad balochSarmad Baloch
Introduction of Object oriented Analysis & Design by SARMAD BALOCH
I AM SARMAD KHOSA
BSIT (5TH A)
(ISP)
FACEBOOK PAGLE::
https://www.facebook.com/LAUGHINGHLAUGHTER/
YOUTUBE CHANNEL:::
https://www.youtube.com/channel/UCUjaIeS-DHI9xv-ZnBpx2hQ
The document provides an overview of object-oriented analysis and design (OOAD). It discusses key OOAD concepts like iterative development, the Unified Process, UML notation, thinking in terms of objects and their services/responsibilities. It explains the differences between object-oriented analysis, which focuses on identifying domain objects, and object-oriented design, which defines software objects and how they collaborate. The document uses a dice game example to illustrate domain modeling with objects, interaction diagrams to show message flows, and a class diagram to define class attributes and methods.
Object-oriented modeling and design uses objects and classes to model real-world concepts. It promotes better understanding of requirements through analysis, design, and implementation using object-oriented notations and processes. Key characteristics include identity, classification through classes, inheritance for sharing features among classes, and polymorphism where operations behave differently for different classes. Modeling involves creating class, state, and interaction models. Object-oriented themes like abstraction, encapsulation, and inheritance allow for flexibility, reusability, and low maintenance costs.
This document provides an introduction to object-oriented concepts and the Unified Modeling Language (UML). It discusses the basic principles of object orientation including abstraction, encapsulation, modularity, and hierarchy. It then defines key object-oriented terms like class, object, attribute, operation, interface, component, and relationships. It provides examples of how these concepts are represented using UML notation.
This document provides an introduction to object-oriented analysis and design (OOAD). It discusses why the OO approach was developed, including to address issues with communication and managing complexity. It then defines key OO concepts like objects, classes, encapsulation, inheritance, polymorphism, and the use of UML. It also briefly outlines the object modeling technique (OMT) methodology and some popular OO development processes.
1) The document discusses complexity in software systems and the object model approach to managing complexity. Complex software systems have many interrelated parts and long lifespans.
2) The object model approach uses principles like abstraction, encapsulation, modularity, hierarchy and typing to organize a software system. Classes define common structure and behavior for objects.
3) Objects have state, behavior and identity according to their class. Relationships like aggregation and inheritance define relationships among classes and objects.
The document discusses the object oriented analysis process and identifying use cases. It describes identifying actors, developing use cases and interaction diagrams to capture system requirements from the user perspective. It provides guidelines for identifying use cases and actors, and developing effective documentation.
Knowledge representation and reasoning (KR) is the field of artificial intelligence (AI) dedicated to representing information about the world in a form that a computer system can utilize to solve complex tasks such as diagnosing a medical condition or having a dialog in a natural language
Lec 3 knowledge acquisition representation and inferenceEyob Sisay
Artificial Intelligence lecture notes. AI summarized notes for knowledge reasoning and knowledge representation, its for you in order for reading and may be for self-learning, I think.
The document provides an introduction to Object Oriented Analysis and Design (OOAD). It discusses key OO concepts including objects, classes, inheritance, polymorphism, and the three main models used in OOAD - the class model, state model, and interaction model. It also provides examples to illustrate concepts like classification, inheritance, polymorphism, and the relationships between the different models. The document is serving as an introductory chapter to OOAD principles and terminology.
Object-oriented analysis and design (OOAD) is a popular approach for analyzing, designing, and developing applications using the object-oriented paradigm. It involves modeling a system as a group of interacting objects at various levels of abstraction. Key concepts in OOAD include objects, classes, attributes, methods, encapsulation, inheritance, polymorphism, and relationships like association, aggregation, and composition. Common OOAD techniques include use case diagrams, which show interactions between actors and the system, and class diagrams, which describe the structure and behavior of system objects and their relationships.
Brief introduction to Object Oriented Analysis and DesignAmrullah Zunzunia
This document provides an overview of object-oriented analysis and design (OOAD). It discusses why OOAD is needed, the benefits it provides, and key concepts like objects, inheritance, polymorphism, encapsulation, cohesion/coupling, and design patterns. OOAD involves analyzing a problem domain to identify objects and their relationships, then designing a conceptual solution where objects collaborate through defined responsibilities and interfaces. The document emphasizes designing for comprehensibility, extensibility, and maintainability by following OO principles like information expert, pure fabrication, and high cohesion/low coupling.
This document discusses ontology-based data access. It begins by defining ontology as a representation of concepts and relationships that define a domain. It then provides examples of ontology elements like concepts, attributes, and relations. It describes how ontologies can be used to share understanding, enable knowledge reuse, and separate domain from operational knowledge. The document outlines the process for developing ontologies including scope, capture, encoding, integration, and evaluation. It discusses using ontologies to provide a user-oriented view of data and facilitate query access across data sources. The document concludes by discussing ongoing work on semantic query analysis and graphical ontology mapping tools.
The document provides an overview of object-oriented analysis and design (OOAD). It discusses the objectives of learning OOAD skills like UML design diagrams and mapping design to code. The agenda includes an introduction to OOAD, UML diagrams, implementation, and OO testing. Object-oriented analysis focuses on identifying domain objects and requirements, while object-oriented design defines software objects and their relationships to meet requirements. UML is the standard notation used to capture objects and relationships. The design is then mapped to code through implementation. Testing ensures the software functions as intended.
Application of Ontology in Semantic Information Retrieval by Prof Shahrul Azm...Khirulnizam Abd Rahman
Application of Ontology in Semantic Information Retrieval
by Prof Shahrul Azman from FSTM, UKM
Presentation for MyREN Seminar 2014
Berjaya Hotel, Kuala Lumpur
27 November 2014
This document discusses software engineering concepts related to object-oriented analysis and design. It defines key terms like object, class, attributes, and methods. It describes object-oriented analysis techniques like object modeling, dynamic modeling, and functional modeling. It also discusses object-oriented design concepts like abstraction, encapsulation, inheritance, and polymorphism. The document also introduces Unified Modeling Language (UML) diagrams like use case diagrams, sequence diagrams, and design principles like modularity, refinement, and functional independence.
Object-oriented analysis and design focuses on conceptualizing a problem in terms of real-world entities called objects. Object-oriented analysis involves identifying the key objects in the problem domain, while object-oriented design defines the logical software objects that will ultimately be implemented as classes. Analysis aims to understand requirements by investigating the problem, whereas design arrives at a detailed logical solution to fulfill requirements and can be implemented in software.
This document is a lecture introduction to object oriented analysis and design (OOA/D) at the University of Education Okara. It discusses key topics that will be covered in the course, including applying the Unified Modeling Language (UML), assigning responsibilities to objects, requirements analysis, use cases, the Unified Process (UP) methodology, and the differences between object oriented analysis, design and implementation. The goal is for students to learn skills in analyzing requirements and designing object-oriented systems using standard best practices.
UNDERSTANDING OOAD AND DESIGN PATTERNS USING UML AND JAVA-TRAINING WORKSHOPAmit Midha
The document discusses a workshop on understanding object-oriented analysis and design (OOAD) patterns using the Unified Modeling Language (UML) and Java. The workshop covers OOAD and UML basics, design patterns, case studies on modeling a banking domain using UML, and hands-on exercises applying design patterns to banking examples. The goal is to teach solving software problems using object-oriented principles and design patterns.
The document provides an overview of object-oriented analysis and design. It discusses key concepts in object-oriented modeling including objects, classes, inheritance, polymorphism, associations, aggregation, generalization, and state diagrams. It also describes object-oriented development processes involving modeling concepts, methodology, and three main models - object/class models, dynamic/state models, and functional/interaction models. The document is intended as an introduction to object-oriented analysis and design principles and techniques.
Introduction to object-oriented analysis and design (OOA/D)Ahmed Farag
Object-oriented analysis involves investigating the problem domain to identify key objects, their attributes, and relationships. Object-oriented design then defines the software objects and how they will collaborate. The document provides an example of analyzing a dice game, including defining use cases, creating a domain model to identify real-world objects like Player and Die, interaction diagrams to illustrate object collaboration, and design class diagrams to define software classes and their methods.
Object-oriented analysis and design (OOAD) emphasizes investigating requirements rather than solutions, and conceptual solutions that fulfill requirements rather than implementations. OOAD focuses on identifying domain concepts and defining software objects and how they collaborate. The unified process model includes inception, elaboration, construction, and transition phases with iterations and milestones leading to final product releases. Main OO concepts are encapsulation, abstraction, inheritance, and polymorphism.
Handout on Object orienetd Analysis and DesignSAFAD ISMAIL
Object-oriented analysis and design (OOAD) is introduced as an approach to analyzing, designing, and developing applications through applying the object-oriented paradigm and visual modeling. Key concepts in OOAD include modeling systems as interacting objects, object-oriented analysis to understand concepts in the problem domain, and object-oriented design to define software objects representing analysis concepts. The document then discusses object basics, the object-oriented development life cycle, benefits of the object-oriented approach, and unified modeling language (UML) as a standard modeling notation for object-oriented systems development.
The document provides an introduction to object-oriented analysis and design (OOAD). It defines OOAD as a process of analyzing problems and developing solutions by planning in UML or pseudocode. Object-oriented analysis focuses on discovering key classes, while object-oriented design models real-world objects and communication between objects through interfaces. The document also outlines principles of object-oriented programming including classes, objects, inheritance, and polymorphism.
This document provides an introduction to object-oriented concepts and methodologies. It defines key OO terms like abstraction, encapsulation, polymorphism, and more. It also discusses object-oriented modeling techniques and popular object-oriented methodologies like Booch, RDD, OMT, and OOSE. The document aims to equip readers with an understanding of fundamental OO principles and how they are applied in analysis, design, and implementation of object-oriented systems.
This document provides an overview of key topics in object-oriented analysis and design that will be covered, including iterative development processes like the Unified Process, UML notation, requirements analysis, OOA/D principles, design patterns, and more. It discusses thinking in terms of objects and their services and responsibilities. Homework is assigned to define and discuss use cases, domain models, interaction diagrams, and class diagrams. Students are responsible for all material in Chapter 1.
This document provides an overview of object-oriented analysis and design (OOAD) concepts. It discusses iterative development processes like the Unified Process and agile approaches. It emphasizes thinking in terms of objects and their services and responsibilities. The document also covers UML notation, requirements analysis, design patterns, OOA/D principles, and implementing designs in code. Students will study these topics and be assigned homework to define and discuss domain models, interaction diagrams, class diagrams, and use cases.
This document provides an overview of object-oriented analysis and design (OOAD) concepts. It discusses iterative development processes like the Unified Process and agile approaches. It emphasizes thinking in terms of objects and their services and responsibilities. The document also covers UML notation, requirements analysis, design patterns, OOA which identifies problem domain objects, and OOD which defines how software objects meet requirements. Students will study these topics and be assigned homework to define and discuss domain models, interaction diagrams, class diagrams, and use cases.
Assignment 1 SYD601 2012 rick_danby completed with audioRickNZ
The document provides an overview of object-oriented systems development. It discusses object-oriented analysis, design, and programming. It covers key concepts like classes, objects, encapsulation, inheritance, polymorphism, and abstraction. It also discusses the unified process, a popular iterative software development process, and its four phases: inception, elaboration, construction, and transition.
Lec 3 knowledge acquisition representation and inferenceEyob Sisay
Artificial Intelligence lecture notes. AI summarized notes for knowledge reasoning and knowledge representation, its for you in order for reading and may be for self-learning, I think.
The document provides an introduction to Object Oriented Analysis and Design (OOAD). It discusses key OO concepts including objects, classes, inheritance, polymorphism, and the three main models used in OOAD - the class model, state model, and interaction model. It also provides examples to illustrate concepts like classification, inheritance, polymorphism, and the relationships between the different models. The document is serving as an introductory chapter to OOAD principles and terminology.
Object-oriented analysis and design (OOAD) is a popular approach for analyzing, designing, and developing applications using the object-oriented paradigm. It involves modeling a system as a group of interacting objects at various levels of abstraction. Key concepts in OOAD include objects, classes, attributes, methods, encapsulation, inheritance, polymorphism, and relationships like association, aggregation, and composition. Common OOAD techniques include use case diagrams, which show interactions between actors and the system, and class diagrams, which describe the structure and behavior of system objects and their relationships.
Brief introduction to Object Oriented Analysis and DesignAmrullah Zunzunia
This document provides an overview of object-oriented analysis and design (OOAD). It discusses why OOAD is needed, the benefits it provides, and key concepts like objects, inheritance, polymorphism, encapsulation, cohesion/coupling, and design patterns. OOAD involves analyzing a problem domain to identify objects and their relationships, then designing a conceptual solution where objects collaborate through defined responsibilities and interfaces. The document emphasizes designing for comprehensibility, extensibility, and maintainability by following OO principles like information expert, pure fabrication, and high cohesion/low coupling.
This document discusses ontology-based data access. It begins by defining ontology as a representation of concepts and relationships that define a domain. It then provides examples of ontology elements like concepts, attributes, and relations. It describes how ontologies can be used to share understanding, enable knowledge reuse, and separate domain from operational knowledge. The document outlines the process for developing ontologies including scope, capture, encoding, integration, and evaluation. It discusses using ontologies to provide a user-oriented view of data and facilitate query access across data sources. The document concludes by discussing ongoing work on semantic query analysis and graphical ontology mapping tools.
The document provides an overview of object-oriented analysis and design (OOAD). It discusses the objectives of learning OOAD skills like UML design diagrams and mapping design to code. The agenda includes an introduction to OOAD, UML diagrams, implementation, and OO testing. Object-oriented analysis focuses on identifying domain objects and requirements, while object-oriented design defines software objects and their relationships to meet requirements. UML is the standard notation used to capture objects and relationships. The design is then mapped to code through implementation. Testing ensures the software functions as intended.
Application of Ontology in Semantic Information Retrieval by Prof Shahrul Azm...Khirulnizam Abd Rahman
Application of Ontology in Semantic Information Retrieval
by Prof Shahrul Azman from FSTM, UKM
Presentation for MyREN Seminar 2014
Berjaya Hotel, Kuala Lumpur
27 November 2014
This document discusses software engineering concepts related to object-oriented analysis and design. It defines key terms like object, class, attributes, and methods. It describes object-oriented analysis techniques like object modeling, dynamic modeling, and functional modeling. It also discusses object-oriented design concepts like abstraction, encapsulation, inheritance, and polymorphism. The document also introduces Unified Modeling Language (UML) diagrams like use case diagrams, sequence diagrams, and design principles like modularity, refinement, and functional independence.
Object-oriented analysis and design focuses on conceptualizing a problem in terms of real-world entities called objects. Object-oriented analysis involves identifying the key objects in the problem domain, while object-oriented design defines the logical software objects that will ultimately be implemented as classes. Analysis aims to understand requirements by investigating the problem, whereas design arrives at a detailed logical solution to fulfill requirements and can be implemented in software.
This document is a lecture introduction to object oriented analysis and design (OOA/D) at the University of Education Okara. It discusses key topics that will be covered in the course, including applying the Unified Modeling Language (UML), assigning responsibilities to objects, requirements analysis, use cases, the Unified Process (UP) methodology, and the differences between object oriented analysis, design and implementation. The goal is for students to learn skills in analyzing requirements and designing object-oriented systems using standard best practices.
UNDERSTANDING OOAD AND DESIGN PATTERNS USING UML AND JAVA-TRAINING WORKSHOPAmit Midha
The document discusses a workshop on understanding object-oriented analysis and design (OOAD) patterns using the Unified Modeling Language (UML) and Java. The workshop covers OOAD and UML basics, design patterns, case studies on modeling a banking domain using UML, and hands-on exercises applying design patterns to banking examples. The goal is to teach solving software problems using object-oriented principles and design patterns.
The document provides an overview of object-oriented analysis and design. It discusses key concepts in object-oriented modeling including objects, classes, inheritance, polymorphism, associations, aggregation, generalization, and state diagrams. It also describes object-oriented development processes involving modeling concepts, methodology, and three main models - object/class models, dynamic/state models, and functional/interaction models. The document is intended as an introduction to object-oriented analysis and design principles and techniques.
Introduction to object-oriented analysis and design (OOA/D)Ahmed Farag
Object-oriented analysis involves investigating the problem domain to identify key objects, their attributes, and relationships. Object-oriented design then defines the software objects and how they will collaborate. The document provides an example of analyzing a dice game, including defining use cases, creating a domain model to identify real-world objects like Player and Die, interaction diagrams to illustrate object collaboration, and design class diagrams to define software classes and their methods.
Object-oriented analysis and design (OOAD) emphasizes investigating requirements rather than solutions, and conceptual solutions that fulfill requirements rather than implementations. OOAD focuses on identifying domain concepts and defining software objects and how they collaborate. The unified process model includes inception, elaboration, construction, and transition phases with iterations and milestones leading to final product releases. Main OO concepts are encapsulation, abstraction, inheritance, and polymorphism.
Handout on Object orienetd Analysis and DesignSAFAD ISMAIL
Object-oriented analysis and design (OOAD) is introduced as an approach to analyzing, designing, and developing applications through applying the object-oriented paradigm and visual modeling. Key concepts in OOAD include modeling systems as interacting objects, object-oriented analysis to understand concepts in the problem domain, and object-oriented design to define software objects representing analysis concepts. The document then discusses object basics, the object-oriented development life cycle, benefits of the object-oriented approach, and unified modeling language (UML) as a standard modeling notation for object-oriented systems development.
The document provides an introduction to object-oriented analysis and design (OOAD). It defines OOAD as a process of analyzing problems and developing solutions by planning in UML or pseudocode. Object-oriented analysis focuses on discovering key classes, while object-oriented design models real-world objects and communication between objects through interfaces. The document also outlines principles of object-oriented programming including classes, objects, inheritance, and polymorphism.
This document provides an introduction to object-oriented concepts and methodologies. It defines key OO terms like abstraction, encapsulation, polymorphism, and more. It also discusses object-oriented modeling techniques and popular object-oriented methodologies like Booch, RDD, OMT, and OOSE. The document aims to equip readers with an understanding of fundamental OO principles and how they are applied in analysis, design, and implementation of object-oriented systems.
This document provides an overview of key topics in object-oriented analysis and design that will be covered, including iterative development processes like the Unified Process, UML notation, requirements analysis, OOA/D principles, design patterns, and more. It discusses thinking in terms of objects and their services and responsibilities. Homework is assigned to define and discuss use cases, domain models, interaction diagrams, and class diagrams. Students are responsible for all material in Chapter 1.
This document provides an overview of object-oriented analysis and design (OOAD) concepts. It discusses iterative development processes like the Unified Process and agile approaches. It emphasizes thinking in terms of objects and their services and responsibilities. The document also covers UML notation, requirements analysis, design patterns, OOA/D principles, and implementing designs in code. Students will study these topics and be assigned homework to define and discuss domain models, interaction diagrams, class diagrams, and use cases.
This document provides an overview of object-oriented analysis and design (OOAD) concepts. It discusses iterative development processes like the Unified Process and agile approaches. It emphasizes thinking in terms of objects and their services and responsibilities. The document also covers UML notation, requirements analysis, design patterns, OOA which identifies problem domain objects, and OOD which defines how software objects meet requirements. Students will study these topics and be assigned homework to define and discuss domain models, interaction diagrams, class diagrams, and use cases.
Assignment 1 SYD601 2012 rick_danby completed with audioRickNZ
The document provides an overview of object-oriented systems development. It discusses object-oriented analysis, design, and programming. It covers key concepts like classes, objects, encapsulation, inheritance, polymorphism, and abstraction. It also discusses the unified process, a popular iterative software development process, and its four phases: inception, elaboration, construction, and transition.
Introduction to Object Oriented ProgrammingMoutaz Haddara
An Introduction to Object-Oriented Programming (OOP)
Download the presentation to view it correctly, as it has some animations that won't show here.
If you have any questions, please contact me. You are free to use it this presentation, but it would be nice at least to give me some credit :)
Content:
1- History of Programming
2. Objects and Classes
3- Abstraction, Inheritance, Encapsulation, and Polymorphism
This document discusses object-oriented analysis and design (OOAD). It introduces the Unified Modeling Language (UML) as a standard notation for capturing objects. Analysis investigates the problem domain to identify objects, while design defines how software objects will collaborate to meet requirements. Key concepts discussed include abstraction, encapsulation, information hiding, and the class-responsibility-collaborator modeling technique. Quality management aims to reduce defects through practices applied throughout the software development process.
This document discusses object-oriented modeling and design. It provides an overview of key concepts in object-oriented thinking like objects, classes, polymorphism, and inheritance. It also describes object-oriented methodology, including analysis, system design, object design, and implementation. Additionally, it discusses object modeling technique (OMT) and the unified modeling language (UML), including the four main views (use case view, design view, process view, and implementation view) used in UML architecture.
This document provides an overview of the CS6502 Object Oriented Analysis and Design course. The course covers UML design diagrams, design patterns, case studies, applying design patterns, and coding and testing. It discusses the objectives of learning OOAD skills, UML, mapping design to code, and testing techniques. Textbooks and reference materials are also listed. The syllabus outlines five units covering UML diagrams, design patterns, a case study, applying patterns, and coding and testing.
introduction of Object oriented programmingRiturajJain8
Object oriented programming (OOP) represents problems using real-world objects and their interactions. This chapter introduces OOP concepts including classes, objects, abstraction, encapsulation, inheritance, and polymorphism. It contrasts OOP with structured programming, which organizes programs in a logical structure rather than representing real-world entities. The chapter defines key OOP terms and provides examples to illustrate abstraction, encapsulation, inheritance, and polymorphism.
Object Oriented Programming in Systems AnalysisAllana Delgado
This document discusses object-oriented techniques and concepts. It covers the object-oriented paradigm, object-oriented analysis and design (OOAD), the steps in modern OO analysis, diagramming tools like the Unified Modeling Language (UML), and the utility of object-oriented programming. Key concepts discussed include classes, objects, inheritance, encapsulation, and polymorphism. Benefits of OO programming include reusability, reliability, and integration with graphical user interfaces.
The document provides an overview of system development methodologies, with a focus on structured analysis and design versus object-oriented analysis and design. It discusses the analysis, design, and implementation phases of an object-oriented systems development life cycle. In the analysis phase, it describes how use case diagrams and class diagrams are used to model object-oriented analysis using the Unified Modeling Language. It also provides guidance on identifying domain classes from problem statements by looking for noun phrases and applying subject matter expertise.
Unit 1 introduces the basics of object-oriented programming (OOP). OOP treats data as objects that contain both data fields (properties) and methods (behaviors). Classes are templates that are used to create objects. Some key principles of OOP include encapsulation, which binds an object's data and methods together, inheritance which allows classes to share structures and behaviors of other classes, and polymorphism which allows different classes to have similarly-named methods that work in different ways. OOP aims to make code reusable, modular, and adaptable to changing requirements compared to traditional procedural programming.
This document provides an introduction to object-oriented programming concepts in ABAP, including definitions of objects, classes, inheritance, polymorphism, and encapsulation. It compares procedural and object-oriented programming, and gives examples of common objects like Customer and Order. The document also discusses how ABAP Objects implements these concepts and the advantages of object-oriented design like reusability and reduced maintenance. Methods are introduced as functions that provide business logic within classes.
Object Modeling Technique (OMT) is real world based modeling approach for software modeling and designing. It was developed basically as a method to develop object-oriented systems and to support object-oriented programming. It describes the static structure of the system.
Object Modeling Technique is easy to draw and use. It is used in many applications like telecommunication, transportation, compilers etc. It is also used in many real world problems. OMT is one of the most popular object oriented development techniques used now-a-days. OMT was developed by James Rambaugh.
Purpose of Object Modeling Technique:
To test physical entity before construction of them.
To make communication easier with the customers.
To present information in an alternative way i.e. visualization.
To reduce the complexity of software.
To solve the real world problems.
Object Modeling Technique’s Models:
There are three main types of models that has been proposed by OMT.
Object Model:
Object Model encompasses the principles of abstraction, encapsulation, modularity, hierarchy, typing, concurrency and persistence. Object Model basically emphasizes on the object and class. Main concepts related with Object Model are classes and their association with attributes. Predefined relationships in object model are aggregation and generalization (multiple inheritance).
Dynamic Model:
Dynamic Model involves states, events and state diagram (transition diagram) on the model. Main concepts related with Dynamic Model are states, transition between states and events to trigger the transitions. Predefined relationships in object model are aggregation (concurrency) and generalization.
Functional Model:
Functional Model focuses on the how data is flowing, where data is stored and different processes. Main concepts involved in Functional Model are data, data flow, data store, process and actors. Functional Model in OMT describes the whole processes and actions with the help of data flow diagram (DFD).
Phases of Object Modeling Technique:
OMT has the following phases:
Analysis:
This the first phase of the object modeling technique. This phase involves the preparation of precise and correct modelling of the real world problems. Analysis phase starts with setting a goal i.e. finding the problem statement. Problem statement is further divided into above discussed three models i.e. object, dynamic and functional model.
System Design:
This is the second phase of the object modeling technique and it comes after the analysis phase. It determines all system architecture, concurrent tasks and data storage. High level architecture of the system is designed during this phase.
FOR MORE INFORMATION CLICK ON THE LINK BELOW :
https://uii.io/programming
This document provides an overview of object-oriented programming (OOP) concepts including classes, objects, encapsulation, inheritance, polymorphism, and relationships between objects. It compares OOP to structured programming and outlines the benefits of OOP such as reusability, extensibility, and maintainability. Key OOP features like encapsulation, inheritance, polymorphism, and relationships are explained in detail. The document also introduces the Unified Modeling Language (UML) as a standard language for visualizing and modeling software systems using OOP concepts.
Object-Oriented Systems Analysis and Design Using UML.pptxXanGwaps
This document discusses object-oriented systems analysis and design using the Unified Modeling Language (UML). It defines object-oriented analysis and design, and explains that UML uses various diagrams to visualize the construction of object-oriented systems. The main components of UML include things, relationships, and diagrams. Key object-oriented concepts like objects, classes, attributes, and methods are also described. Finally, different types of UML diagrams like class, component, deployment, use case and activity diagrams are introduced along with examples.
Ruby on Rails provides a default model-view-controller design and generators that apply progressive evaluation and domain correspondence. The code completion in the IDE and Ruby language has issues with penetrability. Migrations offer a high-level abstraction for data modeling through specialized Ruby files that are invertible and treat objects rather than records. Rails leverages the dynamic Ruby language to provide good domain correspondence, progressive evaluation, and abstraction level, though it is missing error prevention due to the dynamic approach.
This document discusses several design patterns including Singleton, Observer, Delegation, Adapter, Facade, Immutable, Read-Only Interface, Proxy, and Factory. For each pattern, the document describes the context, problem, forces, and solution. The patterns provide reusable solutions to common programming problems by separating interfaces from implementations.
Lisp and Scheme are dialects of the Lisp programming language. Scheme is favored for teaching due to its simplicity. Key features of Lisp include S-expressions as the universal data type, functional programming style with first-class functions, and uniform representation of code and data. Functions are defined using DEFINE and special forms like IF and COND control program flow. Common list operations include functions like CAR, CDR, CONS, LIST, and REVERSE.
Ado.net & data persistence frameworksLuis Goldster
The document discusses serialization, ADO.NET, data tier approaches, and persistence frameworks. Serialization allows persisting an object's state to storage and recreating it later. ADO.NET provides classes for connecting to and interacting with databases. Common data tier approaches include presenting data directly to the presentation layer, adding a business logic layer, or adding a service layer between business logic and data access. Persistence frameworks aim to simplify data access by encapsulating object persistence behaviors like reading, writing, and deleting objects from storage.
The document discusses three common multithreading models: many-to-one, one-to-one, and many-to-many. It also describes common high-level program structures for multithreaded programs like the boss/workers model, pipeline model, up-calls, and using version stamps to keep shared information consistent.
The document provides an overview of business analytics (BA) including its history, types, examples, challenges, and relationship to data mining. BA involves exploring past business performance data to gain insights and guide planning. It can focus on specific business segments. Types of BA include reporting, affinity grouping, clustering, and predictive analytics. Challenges to BA include acquiring high quality data and rapidly processing large volumes of data. Data mining is an important part of BA, helping to sort and analyze large datasets.
This document discusses decision trees and how they are constructed. It begins by explaining that decision trees use supervised learning to generate classification rules by splitting a training dataset based on attribute values. It then walks through an example of constructing a decision tree for predicting voter support based on attributes like age, income, education level, etc. The document discusses that the optimal way to construct a decision tree is NP-complete, so heuristics like information gain are used to choose the best attribute to split on at each node to minimize complexity. It concludes by adding a new social security number attribute and explaining that information gain would not choose to split on this attribute.
The document discusses data mining and knowledge discovery from large datasets. It begins by defining the hierarchy from data to wisdom. It then discusses the growth of big data from various sources and the need for data mining to extract useful knowledge. Data mining involves applying machine learning, statistics, visualization and database techniques to discover patterns in large datasets. The knowledge discovery process involves data cleaning, transformation, data mining and evaluating/interpreting patterns. The document provides examples of data mining applications in business, fraud detection, text mining and web mining.
The document discusses memory hierarchy and caching techniques. It begins by explaining the need for a memory hierarchy due to differing access times of memory technologies like SRAM, DRAM, and disk. It then covers concepts like cache hits, misses, block size, direct mapping, set associativity, compulsory misses, capacity misses, and conflict misses. Finally, it discusses using a second-level cache to reduce memory access times by capturing misses from the first-level cache.
The document discusses non-uniform cache architectures (NUCA), cache coherence, and different implementations of directories in multicore systems. It describes NUCA designs that map data to banks based on distance from the controller to exploit non-uniform access times. Cache coherence is maintained using directory-based protocols that track copies of cache blocks. Directories can be implemented off-chip in DRAM or on-chip using duplicate tag stores or distributing the directory among cache banks. Examples of systems like SGI Origin2000 and Tilera Tile64 that use these techniques are also outlined.
The document proposes optimizing DRAM caches for latency rather than hit rate. It summarizes previous work on DRAM caches like Loh-Hill Cache that treated DRAM cache similarly to SRAM cache. This led to high latency and low bandwidth utilization.
The document introduces the Alloy Cache design which avoids tag serialization to reduce latency. It also proposes a Memory Access Predictor to selectively use parallel or serial access models for low latency and bandwidth. Simulation results show Alloy Cache with a predictor outperforms previous designs like SRAM-tag caches. The design provides benefits with simple structures optimized for DRAM cache constraints.
This document discusses how Analysis Services caching works and provides strategies for warming the Storage Engine cache and Formula Engine cache. It explains that the Storage Engine handles data retrieval from disk while the Formula Engine determines which data is needed for queries. Caching can improve performance but requires understanding when Analysis Services is unable to cache data. The document recommends using the CREATE CACHE statement and running regular queries to pre-populate the caches with commonly used data. Memory usage must also be considered when warming the caches.
This document discusses abstract data types (ADTs) and their implementation in various programming languages. It covers the key concepts of ADTs including data abstraction, encapsulation, information hiding, and defining the public interface separately from the private implementation. It provides examples of ADTs implemented using modules in Modula-2, packages in Ada, classes in C++, generics in Java and C#, and classes in Ruby. Parameterized and encapsulation constructs are also discussed as techniques for implementing and organizing ADTs.
Optimizing shared caches in chip multiprocessorsLuis Goldster
Chip multiprocessors, which place multiple processors on a single chip, have become common in modern processors. There are different approaches to managing caches in chip multiprocessors, including private caches for each processor or shared caches. The optimal approach balances factors like interconnect traffic, duplication of data, load balancing, and cache hit rates. Recent research explores techniques like cooperative caching between private caches and adaptive set pinning in shared caches.
This document provides an overview of APIs, including what they are, why they are useful, common data formats like JSON and XML, RESTful API design principles, and how to consume and create APIs. It discusses API concepts like resources, HTTP verbs, caching, authentication, and error handling. It also provides examples of consuming APIs with tools like Postman and creating a simple API in Node.js.
This document discusses the key concepts of object-oriented programming including abstraction, encapsulation, classes and objects. It defines abstraction as focusing on the essential characteristics of an object and hiding unnecessary details. Encapsulation hides the internal representation of an object within its public interface. A class combines both abstraction and encapsulation, defining the data and operations of an object. Objects are instantiations of classes that are initialized via constructors and cleaned up via destructors.
Object-oriented analysis and design (OOAD) emphasizes investigating requirements rather than solutions, and conceptual solutions that fulfill requirements rather than implementations. OOAD focuses on identifying domain concepts and defining software objects and how they collaborate. The Unified Process includes inception, elaboration, construction, and transition phases with iterations and milestones leading to final product releases.
Abstract classes and interfaces allow for abstraction and polymorphism in object-oriented design. Abstract classes can contain both abstract and concrete methods, while interfaces only contain abstract methods. Abstract classes are used to provide a common definition for subclasses through inheritance, while interfaces define a contract for implementing classes to follow. Both support polymorphism by allowing subclasses/implementing classes to determine the specific implementation for abstract methods.
This document discusses various programming paradigms and concurrency concepts in Java. It covers single process and multi-process programming, as well as multi-core and multi-threaded programming. The document also discusses processes, threads, synchronization, deadlocks, and strategies for designing objects to be thread-safe such as immutability, locking, and splitting state.
The document discusses abstract data types (ADTs), specifically queues. It defines a queue as a linear collection where elements are added to one end and removed from the other end, following a first-in, first-out (FIFO) approach. The key queue operations are enqueue, which adds an element, and dequeue, which removes the element that has been in the queue longest. Queues can be implemented using arrays or linked lists. Array implementations use head and tail pointers to track the start and end of the queue.
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slackshyamraj55
Discover the seamless integration of RPA (Robotic Process Automation), COMPOSER, and APM with AWS IDP enhanced with Slack notifications. Explore how these technologies converge to streamline workflows, optimize performance, and ensure secure access, all while leveraging the power of AWS IDP and real-time communication via Slack notifications.
Essentials of Automations: The Art of Triggers and Actions in FMESafe Software
In this second installment of our Essentials of Automations webinar series, we’ll explore the landscape of triggers and actions, guiding you through the nuances of authoring and adapting workspaces for seamless automations. Gain an understanding of the full spectrum of triggers and actions available in FME, empowering you to enhance your workspaces for efficient automation.
We’ll kick things off by showcasing the most commonly used event-based triggers, introducing you to various automation workflows like manual triggers, schedules, directory watchers, and more. Plus, see how these elements play out in real scenarios.
Whether you’re tweaking your current setup or building from the ground up, this session will arm you with the tools and insights needed to transform your FME usage into a powerhouse of productivity. Join us to discover effective strategies that simplify complex processes, enhancing your productivity and transforming your data management practices with FME. Let’s turn complexity into clarity and make your workspaces work wonders!
Communications Mining Series - Zero to Hero - Session 1DianaGray10
This session provides introduction to UiPath Communication Mining, importance and platform overview. You will acquire a good understand of the phases in Communication Mining as we go over the platform with you. Topics covered:
• Communication Mining Overview
• Why is it important?
• How can it help today’s business and the benefits
• Phases in Communication Mining
• Demo on Platform overview
• Q/A
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceIndexBug
Imagine a world where machines not only perform tasks but also learn, adapt, and make decisions. This is the promise of Artificial Intelligence (AI), a technology that's not just enhancing our lives but revolutionizing entire industries.
Full-RAG: A modern architecture for hyper-personalizationZilliz
Mike Del Balso, CEO & Co-Founder at Tecton, presents "Full RAG," a novel approach to AI recommendation systems, aiming to push beyond the limitations of traditional models through a deep integration of contextual insights and real-time data, leveraging the Retrieval-Augmented Generation architecture. This talk will outline Full RAG's potential to significantly enhance personalization, address engineering challenges such as data management and model training, and introduce data enrichment with reranking as a key solution. Attendees will gain crucial insights into the importance of hyperpersonalization in AI, the capabilities of Full RAG for advanced personalization, and strategies for managing complex data integrations for deploying cutting-edge AI solutions.
In his public lecture, Christian Timmerer provides insights into the fascinating history of video streaming, starting from its humble beginnings before YouTube to the groundbreaking technologies that now dominate platforms like Netflix and ORF ON. Timmerer also presents provocative contributions of his own that have significantly influenced the industry. He concludes by looking at future challenges and invites the audience to join in a discussion.
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfPaige Cruz
Monitoring and observability aren’t traditionally found in software curriculums and many of us cobble this knowledge together from whatever vendor or ecosystem we were first introduced to and whatever is a part of your current company’s observability stack.
While the dev and ops silo continues to crumble….many organizations still relegate monitoring & observability as the purview of ops, infra and SRE teams. This is a mistake - achieving a highly observable system requires collaboration up and down the stack.
I, a former op, would like to extend an invitation to all application developers to join the observability party will share these foundational concepts to build on:
Unlocking Productivity: Leveraging the Potential of Copilot in Microsoft 365, a presentation by Christoforos Vlachos, Senior Solutions Manager – Modern Workplace, Uni Systems
HCL Notes and Domino License Cost Reduction in the World of DLAUpanagenda
Webinar Recording: https://www.panagenda.com/webinars/hcl-notes-and-domino-license-cost-reduction-in-the-world-of-dlau/
The introduction of DLAU and the CCB & CCX licensing model caused quite a stir in the HCL community. As a Notes and Domino customer, you may have faced challenges with unexpected user counts and license costs. You probably have questions on how this new licensing approach works and how to benefit from it. Most importantly, you likely have budget constraints and want to save money where possible. Don’t worry, we can help with all of this!
We’ll show you how to fix common misconfigurations that cause higher-than-expected user counts, and how to identify accounts which you can deactivate to save money. There are also frequent patterns that can cause unnecessary cost, like using a person document instead of a mail-in for shared mailboxes. We’ll provide examples and solutions for those as well. And naturally we’ll explain the new licensing model.
Join HCL Ambassador Marc Thomas in this webinar with a special guest appearance from Franz Walder. It will give you the tools and know-how to stay on top of what is going on with Domino licensing. You will be able lower your cost through an optimized configuration and keep it low going forward.
These topics will be covered
- Reducing license cost by finding and fixing misconfigurations and superfluous accounts
- How do CCB and CCX licenses really work?
- Understanding the DLAU tool and how to best utilize it
- Tips for common problem areas, like team mailboxes, functional/test users, etc
- Practical examples and best practices to implement right away
Infrastructure Challenges in Scaling RAG with Custom AI modelsZilliz
Building Retrieval-Augmented Generation (RAG) systems with open-source and custom AI models is a complex task. This talk explores the challenges in productionizing RAG systems, including retrieval performance, response synthesis, and evaluation. We’ll discuss how to leverage open-source models like text embeddings, language models, and custom fine-tuned models to enhance RAG performance. Additionally, we’ll cover how BentoML can help orchestrate and scale these AI components efficiently, ensuring seamless deployment and management of RAG systems in the cloud.
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUpanagenda
Webinar Recording: https://www.panagenda.com/webinars/hcl-notes-und-domino-lizenzkostenreduzierung-in-der-welt-von-dlau/
DLAU und die Lizenzen nach dem CCB- und CCX-Modell sind für viele in der HCL-Community seit letztem Jahr ein heißes Thema. Als Notes- oder Domino-Kunde haben Sie vielleicht mit unerwartet hohen Benutzerzahlen und Lizenzgebühren zu kämpfen. Sie fragen sich vielleicht, wie diese neue Art der Lizenzierung funktioniert und welchen Nutzen sie Ihnen bringt. Vor allem wollen Sie sicherlich Ihr Budget einhalten und Kosten sparen, wo immer möglich. Das verstehen wir und wir möchten Ihnen dabei helfen!
Wir erklären Ihnen, wie Sie häufige Konfigurationsprobleme lösen können, die dazu führen können, dass mehr Benutzer gezählt werden als nötig, und wie Sie überflüssige oder ungenutzte Konten identifizieren und entfernen können, um Geld zu sparen. Es gibt auch einige Ansätze, die zu unnötigen Ausgaben führen können, z. B. wenn ein Personendokument anstelle eines Mail-Ins für geteilte Mailboxen verwendet wird. Wir zeigen Ihnen solche Fälle und deren Lösungen. Und natürlich erklären wir Ihnen das neue Lizenzmodell.
Nehmen Sie an diesem Webinar teil, bei dem HCL-Ambassador Marc Thomas und Gastredner Franz Walder Ihnen diese neue Welt näherbringen. Es vermittelt Ihnen die Tools und das Know-how, um den Überblick zu bewahren. Sie werden in der Lage sein, Ihre Kosten durch eine optimierte Domino-Konfiguration zu reduzieren und auch in Zukunft gering zu halten.
Diese Themen werden behandelt
- Reduzierung der Lizenzkosten durch Auffinden und Beheben von Fehlkonfigurationen und überflüssigen Konten
- Wie funktionieren CCB- und CCX-Lizenzen wirklich?
- Verstehen des DLAU-Tools und wie man es am besten nutzt
- Tipps für häufige Problembereiche, wie z. B. Team-Postfächer, Funktions-/Testbenutzer usw.
- Praxisbeispiele und Best Practices zum sofortigen Umsetzen
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...Neo4j
Leonard Jayamohan, Partner & Generative AI Lead, Deloitte
This keynote will reveal how Deloitte leverages Neo4j’s graph power for groundbreaking digital twin solutions, achieving a staggering 100x performance boost. Discover the essential role knowledge graphs play in successful generative AI implementations. Plus, get an exclusive look at an innovative Neo4j + Generative AI solution Deloitte is developing in-house.
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024Neo4j
Neha Bajwa, Vice President of Product Marketing, Neo4j
Join us as we explore breakthrough innovations enabled by interconnected data and AI. Discover firsthand how organizations use relationships in data to uncover contextual insights and solve our most pressing challenges – from optimizing supply chains, detecting fraud, and improving customer experiences to accelerating drug discoveries.
Driving Business Innovation: Latest Generative AI Advancements & Success StorySafe Software
Are you ready to revolutionize how you handle data? Join us for a webinar where we’ll bring you up to speed with the latest advancements in Generative AI technology and discover how leveraging FME with tools from giants like Google Gemini, Amazon, and Microsoft OpenAI can supercharge your workflow efficiency.
During the hour, we’ll take you through:
Guest Speaker Segment with Hannah Barrington: Dive into the world of dynamic real estate marketing with Hannah, the Marketing Manager at Workspace Group. Hear firsthand how their team generates engaging descriptions for thousands of office units by integrating diverse data sources—from PDF floorplans to web pages—using FME transformers, like OpenAIVisionConnector and AnthropicVisionConnector. This use case will show you how GenAI can streamline content creation for marketing across the board.
Ollama Use Case: Learn how Scenario Specialist Dmitri Bagh has utilized Ollama within FME to input data, create custom models, and enhance security protocols. This segment will include demos to illustrate the full capabilities of FME in AI-driven processes.
Custom AI Models: Discover how to leverage FME to build personalized AI models using your data. Whether it’s populating a model with local data for added security or integrating public AI tools, find out how FME facilitates a versatile and secure approach to AI.
We’ll wrap up with a live Q&A session where you can engage with our experts on your specific use cases, and learn more about optimizing your data workflows with AI.
This webinar is ideal for professionals seeking to harness the power of AI within their data management systems while ensuring high levels of customization and security. Whether you're a novice or an expert, gain actionable insights and strategies to elevate your data processes. Join us to see how FME and AI can revolutionize how you work with data!
Climate Impact of Software Testing at Nordic Testing DaysKari Kakkonen
My slides at Nordic Testing Days 6.6.2024
Climate impact / sustainability of software testing discussed on the talk. ICT and testing must carry their part of global responsibility to help with the climat warming. We can minimize the carbon footprint but we can also have a carbon handprint, a positive impact on the climate. Quality characteristics can be added with sustainability, and then measured continuously. Test environments can be used less, and in smaller scale and on demand. Test techniques can be used in optimizing or minimizing number of tests. Test automation can be used to speed up testing.
Pushing the limits of ePRTC: 100ns holdover for 100 daysAdtran
At WSTS 2024, Alon Stern explored the topic of parametric holdover and explained how recent research findings can be implemented in real-world PNT networks to achieve 100 nanoseconds of accuracy for up to 100 days.
2. Foundations of the Object Model
• Structured Design Methods evolved
– For Developer (who build complex systems)
– Using Procedural PL
– Using algorithms as their fundamental building blocks
(Algorithmic Abstraction)
• Object-Oriented Design Methods evolved
– For Developers (who build complex systems)
– Using object-based and object-oriented PL
– using the class and object as basic building blocks.
3. Object Model
• Object Model is applicable
– not just to the programming languages
– but also
– to the design of
• User Interfaces,
• Databases, and
• even Computer Architectures.
• The reason for this widespread application is that
– an object orientation helps to cope with the
complexity (inherent in many different kinds of
systems).
4. Object Model
• Unfortunately, most programmers are trained
only in the principles of Structured Design (SD)
– Many good engineers have developed useful
software using SD
– However, there are limits to the amount of
complexity we can handle using only algorithmic
decomposition
– Thus we must turn to object-oriented
decomposition.
5. Object Model
• if we try to use object based languages such as
C++ and Ada
• as if they were only traditional, algorithmically
oriented languages,
• we not only miss the power available to us,
• but we usually end up worse off than if we had
used an older language such as C or Pascal.
6. OOP, OOD, and OOA
• As Object Model is derived from so many
disparate sources, it includes lot of confusion
in terminology
• Some unified concepts
– the concept of an object is central to anything
object-oriented
• Where an object is a tangible entity that exhibits some
well-defined behavior
7. OOP, OOD, and OOA
• Some unified concepts …
– Objects are "entities that combine the properties of procedures
and data since they perform computations and save local state".
– Objects serve to unify the ideas of algorithmic and data
abstraction.
– In the object model, emphasis is placed on crisply characterizing
the components of the physical or abstract system to be
modeled by a programmed system.
– Objects have a certain 'integrity' which should not (in fact,
cannot) be violated.
8. OOP, OOD, and OOA
• An object can only change state, behave, be manipulated,
or stand in relation to other objects in ways appropriate to
that object.
• Stated differently, there exist invariant properties that
characterize an object and its behavior.
• An elevator, for example, is characterized by invariant
properties including [that] it only travels up and down
inside its shaft.
• Any elevator simulation must incorporate these invariants,
for they are integral to the notion of an elevator
9. Object-Oriented Programming (OOP)
Definition
• Object-oriented programming is a method of
implementation in which programs are
organized as cooperative collections of
objects, each of which represents an instance
of some class, and whose classes are all
members of a hierarchy of classes united via
inheritance relationships.
10. OOP
• Three important parts of the definition
• object-oriented programming
– (1) uses objects (not algorithms) as its
fundamental logical building blocks (the “part of”
hierarchy)
– (2) each object is an instance of some class, and
– (3) classes are related to one another via
inheritance relationships (the "is a" hierarchy)
11. OOP
• if any of these elements is missing, it is not an
object-oriented program
• Specifically, programming without inheritance
is distinctly (definitely) not object-oriented
– we call it programming with abstract data types
12. OOP
• OO PL
– Well support for the object-oriented style of
programming is must for OOPL
– That is, it should be convenient to use OO style in
writing program in OOPL
– No exceptional effort or skill should be required
13. OOP
• Theoretically OOP can be done using non-object
oriented PL like Pascal and COBOL
• But, it is badly awkward to do so.
•
• A language is object-oriented if and only if it satisfies
the following requirements:
– It supports objects that are data abstractions with an
interface of named operations and a hidden local state.
– Objects have an associated type [class].
– Types [classes] may inherit attributes from super types
[super classes]
14. OOP
• We say that a PL supports inheritance
– If it is possible to express "is a" relationships among types
– for example, a red rose is a kind of flower, and a flower is a kind of
plant.
• If a language does not provide direct support for inheritance, then it
is not object-oriented. We distinguish such languages by calling
them object-based rather than object-oriented.
• Under this definition, for example
– Smalltalk, Object Pascal, and C++ are object-oriented, and
– Ada is object-based.
•
• However, since objects and classes are elements of both kinds PL
– object-oriented design methods can be used with both
15. Object-Oriented Design (OOD)
• The emphasis in programming methods is
primarily on the proper and effective use of
particular language mechanisms.
• By contrast, design methods emphasize the
proper and effective structuring of a complex
system.
• What then is object-oriented design?
16. OOD
Definition
• Object-oriented design is a method of design
encompassing the process of object-oriented
decomposition and a notation for depicting
[both] logical and physical as well as static
and dynamic models of the system under
design.
17. OOD
• Two important parts of the definition
• object-oriented design
– (1) leads to an object oriented decomposition and
– (2) uses different notations to express different
models of the logical (class and object structure)
and physical (module and process architecture)
design of a system, in addition to the static and
dynamic aspects of the system.
18. OOD
• OOD
– support for object-oriented decomposition
– uses class and object abstractions to logically
structure systems
• Structured Design
– uses algorithmic abstractions
19. Object-Oriented Analysis (OOA)
• Object Model has influenced even earlier phases
of SE
• Structured Analysis
– focuses upon the flow of data within a system.
• OOA
– emphasizes the building of real-world models, using
an object-oriented view of the world.
20. OOA
Definition
• Object-oriented analysis is a method of
analysis that examines requirements from the
perspective of the classes and objects found in
the vocabulary of the problem domain.
21. OOA, OOD, OOP
• How are OOA, OOD, and OOP related?
• OOD uses outcome of OOA
• OOP uses outcome of OOD
• That is, OOA OOD OOP
22. Elements of the Object Model
Kinds of Programming Pattern
• Most Programmers work in one PL and use
only one programming style
– Unable to think Alternate ways (more appropriate
style) to solve problem
• programming style is
– a way of organizing programs on the basis of some
conceptual model of programming and an
appropriate language to make programs written in
the style clear
23. Kinds of Programming Pattern
• Five main types of Programming Style and
respective Abstraction used
– Procedure-oriented Algorithms
– Object-oriented Classes and objects
– Logic-oriented Goals (Predicate Calculus)
– Rule-oriented If-then rules
– Constraint-oriented Invariant relationships
24. Kinds of Programming Pattern
• There is no single programming style that is best for all kinds of
applications.
– For example, rule-oriented programming would be best for the design
of a knowledge base, and procedure-oriented programming would be
best suited for the design of computation-intense operations.
• The object-oriented style is best suited to the broadest set of
applications
– indeed, this programming paradigm often serves as the architectural
framework in which we employ other paradigms.
• Each of these styles of programming is based upon its own
conceptual framework. Each requires a different mindset, a
different way of thinking about the problem.
• For all things object-oriented, the conceptual framework is the
Object Model.
25. Object Model (OM)
• There are four major elements of OM
– Abstraction
– Encapsulation
– Modularity
– Hierarchy
• By major, we mean that a model without any
one of these elements is not object-oriented.
26. Object Model
• There are three minor elements of the OM
– Typing
– Concurrency
– Persistence
• By minor, we mean that each of these
elements is a useful, but not essential, part of
the object model.
27. Object Model
• Without this conceptual framework, you may be
programming in a OOPL (such as C++, Java, or C#).
• But, your design is going to smell like a procedural PL
(such as C, FORTRAN, or Pascal)
• You will miss expressive power of the object-oriented
language
• More importantly, it is likely that you have not
mastered the complexity of the problem at hand.
28. Elements of the Object Model
1. Abstraction
• Abstraction is one of the fundamental ways to cope with complexity
• Abstraction arises from a recognition of similarities between certain
objects, situations, or processes in the real world, and the decision to
concentrate upon these similarities and to ignore for the time being the
differences
• Abstraction is a simplified description, or specification, of a system that
emphasizes some of the system's details or properties while suppressing
others. A good abstraction is one that emphasizes details that are
significant to the reader or user and suppresses details that are, at least
for the moment, immaterial or diversionary
• A concept qualifies as an Abstraction only if it can be described,
understood, and analyzed independently of the mechanism that will
eventually be used to realize it
29. Elements of the Object Model
1. Abstraction
• Combining these different viewpoints, we
define an abstraction as follows:
• An abstraction denotes the essential
characteristics of an object that distinguish it
from all other kinds of objects and thus
provide crisply defined conceptual boundaries,
relative to the perspective of the viewer.
31. Elements of the Object Model
1. Abstraction
• An abstraction focuses on the outside view of an object, and so
serves to separate an object's essential behavior from its
implementation
• This behavior/implementation division is called abstraction barrier
achieved by applying the principle of least commitment, through
which the interface of an object provides its essential behavior, and
nothing more
• We like to use an additional principle that we call the principle of
least astonishment, through which an abstraction captures the
entire behavior of some object, no more and no less, and offers no
surprises or side effects that beyond the scope of the abstraction.
32. Elements of the Object Model
1. Abstraction
• Spectrum/Kinds of Abstractions (most to least
useful)
– Entity Abstraction
– Action Abstraction
– Virtual Machine Abstraction
– Coincidental Abstraction
33. Elements of the Object Model
1. Abstraction
• Entity Abstraction
– An object that represents a useful model of a
problem domain or solution-domain entity
– Most Useful
– We should strive to build Entity Abstractions, as it
closely models the problem domain
34. Elements of the Object Model
1. Abstraction
• Action Abstraction
– An object that provides a generalized set of
operations, all of which perform the same kind of
function
35. Elements of the Object Model
1. Abstraction
• Virtual Machine Abstraction
– An object that groups together operations that are
all used by some superior level of control, or
operations that all use some junior-level set of
operations
36. Elements of the Object Model
1. Abstraction
• Coincidental Abstraction
– An object that packages a set of operations that
have no relation to each other
– Least useful (Not useful)
37. Elements of the Object Model
1. Abstraction
• Client Object uses resources of Server Object
• Contract Model of Programming
– the outside view of each object defines a contract
upon which other objects may depend, and which in
turn must be carried out by the inside view of the
object itself (often in collaboration with other objects)
– this contract encompasses (include) the
responsibilities of an object, namely, the behavior for
which it is held accountable
38. Elements of the Object Model
1. Abstraction
• Individually, each operation that contributes
to this contract has a unique signature
comprising all of its formal arguments and
return type.
• We call the entire set of operations that a
client may perform upon an object, together
with the legal orderings in which they may be
invoked, its protocol.
39. Elements of the Object Model
1. Abstraction
• An invariant is some Boolean (true or false)
condition whose truth must be preserved.
• For each operation associated with an object,
we may define
– preconditions (invariants assumed by the
operation) as well as
– post conditions (invariants satisfied by the
operation).
40. Elements of the Object Model
1. Abstraction
• Violating an invariant breaks the contract
associated with an abstraction.
• If a precondition is violated, this means that a
Client has not satisfied its part, and hence the
server cannot proceed reliably.
• Similarly, if a post-condition is violated, this
means that a server has not carried out its part of
the contract
41. Elements of the Object Model
1. Abstraction
• An exception is an indication that some invariant has
not been or cannot be satisfied.
• Certain languages permit objects to throw exceptions
so as to abandon processing and alert other object to
(about) the problem, who in turn may catch the
exception and handle the problem.
• The terms operation, method, and member function
evolved from three different PL (Ada, Smalltalk, and
C++, respectively). They all mean virtually the same
thing can be used interchangeably.
42. Elements of the Object Model
1. Abstraction
• All abstractions have static as well as dynamic properties.
• For example, a file object
– amount of space
– Name
– content
• These are all static properties
• The value of each of these properties is dynamic, relative to
the lifetime of the object
– a file object may grow or shrink in size
– its name may change
– Its contents may change.
43. Elements of the Object Model
1. Abstraction
• All abstractions have static as well as dynamic
properties.
– Car
• Static Property: Registration No., Company Name
• Dynamic Property: Current Speed, Owner Name
– Person
• Name, Date of Birth, SSN
• Cell Phone, Address, Hobby, Salary
44. Elements of the Object Model
1. Abstraction
• In an object-oriented style of programming, things
happen whenever we operate upon an object
• (i.e., when we send a message to an object).
• Thus, invoking an operation upon an object elicits
(reveals) some reaction from the object.
• What operations we can meaningfully perform upon an
object and how that object reacts constitute the entire
behavior of the object.
45. Elements of the Object Model
1. Abstraction
• Examples of Abstraction (Assume)
• Sensors (Air, Water, Humidity, Light, pH, etc.)
• Temperature Sensor
– Along with Location Info.
• Responsibility?
– Reporting the current Temp. in F
46. Elements of the Object Model
1. Abstraction
typedef float Temperature; //Temperature in degrees Fahrenheit
typedef unsigned int Location; // Number uniquely denoting the location of a sensor
class TemperatureSensor
{
Public:
TemperatureSensor(Location);
~TemperatureSensor() ;
void calibrate(Temperature actualTemperature);
Temperature currentTemperature() const;
private:
…
};
47. Elements of the Object Model
1. Abstraction
• Private Parts
– Its representation (Implementation) is Hidden in
Private parts of object
• Instance (Object that can be operated upon)
Temperature temperature;
//Creates two different objects (instances) of the class “TemperatureSensor)
TemperatureSensor greenhouselSensor(l);
TemperatureSensor greenhouse2Sensor(2);
temperature = greenhouselSensor.currentTemperature();
48. Elements of the Object Model
1. Abstraction
• Invariants (associated with the operation
currentTemperature)
– Pre-condition
• Object will be created with valid location
– Post-condition
• Returns Temperature Value in Fahrenheit
49. Elements of the Object Model
1. Abstraction
• Passive VS Active Object
– Passive abstraction is one in which some client
object must operate on abstracted entity to get
service (e.g., to get current Temperature)
– In Active abstraction, abstracted entity acts upon
(rather than being acted upon by) other objects
whenever some condition arise (e.g., I need SMS,
when temperature is not in a given range)
50. • Responsibility Changes in Active abstraction
– Now, Sensor is responsible to report current
temperature
– Earlier, client was responsible to demand temp.
• This scenario can be implemented with the
“callback” feature of PL
51. • When client creates an Object
– An additional information, particularly, CallBack
function also needs to be passed. This callback
function will be called on detecting predetermine
condition
• Server Object calls “CallBack” function when
some condition arises
52. Elements of the Object Model
1. Abstraction
class ActiveTemperatureSensor {
public:
ActiveTemperatureSensor(Location, void (*f)(Location, Temperature));
~ActiveTemperatureSensor();
void calibrate(Temperature actualTemperature);
void establishSetpoint(Temperature setpoint, Temperature delta);
Temperature currentTemperature() const; //Client can still inquire
private:
…
};
53. Elements of the Object Model
1. Abstraction
• Object may collaborate with other objects to achieve
some behavior
– Plan Condition & Growing Plan
// Structure denoting relevant plan conditions
struct Condition //Struct Vs. Class
{
Temperature temperature;
Lights lighting;
pH acidity;
Concentration concentration;
};
54. Elements of the Object Model
1. Abstraction
class GrowingPlan {
public:
GrowingPlan(char* name);
virtual ~GrowingPlan();
void clear();
virtual void establish(Day, Hour, const Condition&);
const char* name() const;
const Condition& desiredConditions(Day, Hour) const;
protected:
…
};
55. Elements of the Object Model
1. Abstraction
• Constructor and Destructor (Creates/Destroys)
– GrowingPlan(), ~GrowingPlan()
– Called Meta-Operations
• Modifiers – Update state
– Clear(), Establish()
• Selectors (Returns/Selects state value)
– name(), desiredConditions()
56. Elements of the Object Model
Example
• Example in C++
– Abstraction
– Encapsulation
57. Elements of the Object Model
2. Encapsulation
• Abstraction of an object should precede the
decisions about its implementation.
• Once an implementation is selected, it should be
treated as a secret of the abstraction and hidden
from most clients.
• No part of a complex System should depend on
the internal details of any other part
58. Elements of the Object Model
2. Encapsulation
• Abstraction - helps people to think about what they- are
doing
• Encapsulation - allows program changes to be reliably
made with limited effort
• Abstraction and encapsulation are complementary
concepts: abstraction focuses upon the observable
behavior of an object, whereas encapsulation focuses upon
the implementation that gives rise to this behavior.
• Encapsulation is most often achieved through information
hiding
59. Elements of the Object Model
2. Encapsulation
• Information Hiding
– is the process of hiding all the secrets of an object that
do not contribute to its essential characteristics
• (typically, the structure of an object is hidden, as well as the
,implementation of its methods)
• Encapsulation provides explicit barriers among
different abstractions of system
– objects at one level of abstraction are shielded from
implementation details at lower levels of abstraction
60. Elements of the Object Model
2. Encapsulation
• For abstraction to work, implementations must be
encapsulated
– this means that each class must have two parts: an
interface and an implementation.
• The interface of a class captures only its outside view,
encompassing our abstraction (of the behavior
common to all instances of the class)
• The implementation of a class comprises the
representation of the abstraction as well as the
mechanisms that achieve the desired behavior.
61. Elements of the Object Model
2. Encapsulation
• The interface of a class is the one place where
we assert/state all of the assumptions that a
client may make about any instances of the
class
• the implementation encapsulates details
about which no client may make assumptions.
62. Elements of the Object Model
2. Encapsulation
• Definition
• Encapsulation is the process of
compartmentalizing the elements of an
abstraction that constitute its structure and
behavior; encapsulation serves to separate the
contractual interface of an abstraction and its
implementation.
63. Elements of the Object Model
2. Encapsulation
• Example
• Consider 3 abstractions
– Temperature Sensor
– Heater (Turn ON, Turn OFF, IsON)
– Temperature Control
• Higher-level behavior build on a top of Sensor & Heater
• Adds new semantic, prevent frequent ON, OFF of Heater;
when temperature is near boundary conditions
(hysteresis)
64. Elements of the Object Model
2. Encapsulation
• Example
enum Boolean {FALSE, TRUE}; // Boolean type
Class Heater {
public:
Heater(location);
~Heater();
void turnOn();
void turnOff();
Boolean isOn() const;
private:
…
}; // This interface represent all that a client needs to know
// In-side implementation may highly complex using
// Serial Ports [Class] to send signals to distant Heaters
65. Elements of the Object Model
2. Encapsulation
• In future, developer may choose to use Memory-
mapped I/O instead of serial communication lines
• This means Implementation is modified. But, it does
not require to change Interface
• As long as Interface (functional behavior of abstraction)
is not changed
– Client code that uses this class need not have to be
modified
– Unless a particular client depends upon the time or space
semantics of original implementation (highly undesirable)
66. Elements of the Object Model
2. Encapsulation
• The representation of an object is often
changed by developer (based on system’s
performance) so that more efficient algorithm
can be applied
• This ability to change the representation of an
abstraction without disturbing any of its
clients is essential benefits of encapsulation
67. Elements of the Object Model
2. Encapsulation
• The Encapsulation is supported by different PL
in various ways and extents
• For example, C++ offers flexible control over the
member data elements and member functions.
Member may be placed in
– Public (visible to all)
– Private or (fully encapsulated)
– Protected part (visible to class and its subclasses)
68. Elements of the Object Model
2. Encapsulation
• C++ also supports the notion of friends:
– Cooperative classes that are permitted to see/use each
other’s parts.
• Hiding is relative concept.
– The underlying representation of an object can be
revealed, if developer wish to do so.
– Encapsulation cannot stop a developer from doing stupid
things
– Further, no PL prevents a human from literally seeing the
implementation of a class (although, an OS can prevent)
– There are times when one must study the implementation
of a class to really understand its meaning
69. Elements of the Object Model
3. Modularity
• The act of partitioning a program into
individual components can reduce its
complexity to some degree
• partitioning a program creates a number of
well defined, documented boundaries within
the program.
70. Elements of the Object Model
3. Modularity
• In some languages, such as Smalltalk, there is no
concept of a module
• In many others, including Object Pascal, C++, CLOS, and
Ada, the module is a separate language construct, and
therefore warrants a separate set of design decisions.
• In these languages, classes and objects form the logical
structure of a system; we place these abstractions in
modules to produce the system's physical architecture.
71. Elements of the Object Model
3. Modularity
• Especially for larger applications, in which we
may have many hundreds of classes, the use of
modules is essential to help/manage complexity.
• modularization consists of dividing a program
into modules which can be compiled separately,
but which have connections with other modules
– The connections between modules are the
assumptions which the modules make about each
other
72. Elements of the Object Model
3. Modularity
• Module and encapsulation go hand in hand
– PL supports notion of
• Interface of module and
• its Implementation
• Again, different PL supports module in diverse way
• Module in also known as Unit, Package, Assembly, DLL,
etc.
• Deciding the right set of modules for a given system is
hard problem
73. Elements of the Object Model
3. Modularity
• Modules serve as the physical containers in which we
declare the classes and objects of our logical design
• For tiny problems, the developer might decide to
declare every class and object in the same package.
• A better solution is to group logically related classes
and objects in the same module, and expose only
those elements that other modules absolutely must
see.
• Arbitrary modularization is sometimes worse than no
modularization at all
74. Elements of the Object Model
3. Modularity
• guidelines to achieve an intelligent
modularization of classes and objects
– The overall goal of the decomposition into modules is
the reduction of software cost by allowing modules to
be designed and revised independently
– Each module's structure should be simple enough that
it can be understood fully;
– it should be possible to change the implementation of
module without knowledge of the implementation of
other modules and without affecting the behavior of
other modules
75. Elements of the Object Model
3. Modularity
– The cost of changing (and re-compilation) an
interface is very high compare to changing an
implementation
• Requires re-compilation of all module that uses services
of the module directly or indirectly.
• For this reason, For this reason, a module's interface
should be as narrow as possible
• hide as much as you can in the implementation of a
module
• Incremental addition to interface is better than
handling extra interface
76. Elements of the Object Model
3. Modularity
• The developer must balance two competing technical concerns
– the desire to encapsulate abstractions, and
– the need to make certain abstractions visible to other modules.
• Guidance
– System details that are likely to change independently should be the secrets of
separate modules
– the only assumptions that should appear between modules are those that are
considered unlikely to change.
– Every data structure is private to one module
– it may be directly accessed by one or more programs within the module but
not by programs outside the module.
– Any other program that requires information stored in a module's data
Structures must obtain it by calling module programs
• In other words, strive to build modules that are
– cohesive (by grouping logically related abstractions) and
– loosely coupled (by minimizing the dependencies among modules).
77. Elements of the Object Model
3. Modularity
• Definition
• Modularity is the property of a system that
has been decomposed into a set of cohesive
and loosely coupled modules.
78. Elements of the Object Model
3. Modularity
• Other issues that can affect modularization
decisions:
– Package classes such that Reuse is convenient
– Size of compiled unit
– Work assignment to different teams
– To save documentation & related effort
– Security (the code that need security)
79. Elements of the Object Model
3. Modularity
• Logical Design
– Identification of Classes & Objects
• Physical Design
– Identification of Modules
• Both the designs are done iteratively
– That is, No one follows the other completely
80. Elements of the Object Model
3. Modularity
• Example
• Module-X //depends on 3 modules
#include<string.h>
#include<math.h>
#include<moduleY.h>
…
Void main()
{ …}
81. Elements of the Object Model
3. Modularity
• Other way of division of Software
– 2-tier Client/Server Architecture
– 3-tier or N-tier Architecture
– MVC Architecture
– SOA
82. Elements of the Object Model
4. Hierarchy
• Encapsulation helps in managing complexity by hiding
the inside-view of abstraction
• Module helps in clustering logically related abstractions
• This is not enough. A set of abstractions often forms a
hierarchy
• identifying these hierarchies greatly simplify our
understanding of the problem.
83. Elements of the Object Model
4. Hierarchy
• Definition
– Hierarchy is a ranking or ordering of abstractions.
• The most important hierarchies in a complex
system are:
– its class structure (the "is a" hierarchy) and
– its object structure (the "part of' hierarchy).
84. Elements of the Object Model
4. Hierarchy
• Inheritance is the most important "is a” hierarchy
• Inheritance defines a relationship among classes
• one class shares the structure or behavior defined in one or
more classes (denoting single inheritance and multiple
inheritance, respectively).
• Inheritance thus represents a hierarchy of abstractions, in
which a sub-class inherits from one or more super-classes.
• Typically, a subclass augments or redefines the existing
structure and behavior of its super-classes.
85. Elements of the Object Model
4. Hierarchy
• Semantically, inheritance denotes an "is-a" relationship. For
example
• Single Inheritance
– House is a Property
– Car is a Vehicle
– Teaching Staff is a Staff
• Multiple Inheritance
• Teaching, Non-Teaching, Trainee, Permanent
– Trainee Teaching Staff is a Teaching Staff
– Trainee Teaching Staff is a Trainee Staff
86. Elements of the Object Model
4. Hierarchy
• Inheritance thus implies a generalization/
specialization hierarchy
– wherein a subclass specializes the more general
structure or behavior of its super-classes.
• Litmus test for inheritance
– if B "is not a" kind of A, then B should not inherit
from A.
87. Elements of the Object Model
4. Hierarchy
• class FruitGrowingPlan : public GrowingPlan {
– public:
• FruitGrowinjgPlan(char* name);
• virtual ~FruitGrowingPlan();
• virtual void establish(Day, Hour, Condition&); //Overridding (modified)
• void scheduleHarvest(Day, Hour); //New Methods
• Boolean isHarvested() const; //New Methods
• unsigned daysUntilHarvest() const; //New Methods
• Yield estimatedYield() const; //New Methods
– protected:
• Boolean repHarvested; //New Data Member
• Yield repYield; //New Data Member
• };
88. Elements of the Object Model
4. Hierarchy
• Inheritance
– Supports Re-Use
– Otherwise each class designer starts from scratch
– Not only it is duplication of effort, it generates
inconsistency in code also.
89. Elements of the Object Model
4. Hierarchy
• Inheritance VS. Abstraction
• Data abstraction attempts to provide an opaque
barrier behind which methods and state are
hidden
• Inheritance requires opening this interface to
some extent and may allow state as well as
methods to be accessed without abstraction
90. Elements of the Object Model
4. Hierarchy
• For a given class, there are usually two kinds
of clients:
– objects that invoke operations upon instances of
the class, and
– subclasses that inherit from the class
91. Elements of the Object Model
4. Hierarchy
• with inheritance, encapsulation can be violated in
one of three ways:
– The subclass might access an instance variable of its
super-class,
– Call a private operation of its super-class, or
– Refer directly to super-classes of its super-class
• PL may allow to control Inheritance
– E.g., in C++, one can use modifiers such as public,
private, and protected
92. • Example of Multiple Inheritance
class Plant {
public:
Plant (char* name, char* species);
virtual ~Plant();
void setDatePlanted(Day);
virtual establishGrowingConditions(const Condition&);
const char* name() const;
const char* species() const;
Day datePlanted() Const;
Protected:
char* repName;
char* repSpecies;
Day repPlanted;
private:
…
};
93. class FlowerMixin {
public:
FlowerMixin(Day timeToFlower, Day timeToSeed);
virtual ~FlowerMixin();
Day timeToFlower() const;
Day timeToSced() const;
protected:
…
};
class FruitVegetableMixin {
public:
FruitVegetablieMixin(Day timeToHarvest);
virtual ~FruitVegetableMixin();
Day timeToHarvesto const;
protected:
…
};
94. Elements of the Object Model
4. Hierarchy
• class Rose : public Plant, public FlowerMixin...
• class Carrot : public Plant, public FruitVegetableMixin
{};
• in both cases, we form the subclass by inheriting from
two super-classes.
• Instances of the subclass Rose thus include the
structure and behavior from the class Plant together
with the structure and behavior from the class
FlowerMixin
95. Elements of the Object Model
4. Hierarchy
• Multiple inheritance introduces complexities for PL
• PL must address two issues
– Clashes among names from different super-classes, and
– repeated inheritance.
• Clashes will occur when two or more super-classes provide
a field or operation with the same name or signature
– In C++, such clashes must be resolved with explicit qualification
• Repeated inheritance occurs when two or more super-
classes share a common super-class
96. Elements of the Object Model
4. Hierarchy
• Example of Hierarchy (Aggregation)
• Whereas these "is a" hierarchies denote generalization/
specialization relationships, "part of” hierarchies describe
aggregation relationships.
• For example, consider the following class:
class Garden {
public:
Garden();
virtual ~Garden();
protected:
Plant* repPlants[100];
GrowingPlan repPlan;
};
97. Elements of the Object Model
4. Hierarchy
• In terms of its "is a" hierarchy, a high-level
abstraction is generalized, and a low-level
abstraction is specialized.
– E.g., Flower class is at a higher level of abstraction
then a Plant class.
• In terms of its "part of' hierarchy, a class is at a
higher level of abstraction than any of the classes
that make up its implementation
– E.g., Garden is at a higher level of abstraction than the
type plant
98. Elements of the Object Model
4. Hierarchy
• aggregation permits the physical grouping of
logically related structures, and
• inheritance allows these common groups to
be easily reused among different abstractions.
99. Elements of the Object Model
4. Hierarchy
• Aggregation raises the issue of ownership.
• Assume that the lifetime of a garden and its
plants are independent
– Implemented by including pointers to Plant objects
rather than values.
• In contrast, we have decided that a GrowingPlan
object is inherently associated with a Garden
object, and does not exist independently of the
garden.
– For this reason, we use a value of GrowingPlan.