1 / 25

System Engineering and Databases

Learn basic object orientation principles, concepts, UML modeling mechanisms, and methodologies. Understand strengths like modularity and encapsulation for effective software design.

anicklas
Download Presentation

System Engineering and Databases

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

E N D

Presentation Transcript


  1. System Engineering and Databases Lecture 3: Introduction to Software Analysis and Design - Object-Oriented Notions Prof. Kazimierz Subieta Polish-Japanese Institute of Information Technology Institute of Computer Science, Warsaw, Poland subieta@ipipan.waw.pl http://www.ipipan.waw.pl/~subieta

  2. Content • Basic Principles of Object Orientation: Abstraction, Encapsulation, Modularity, Hierarchy • Basic Concepts of Object Orientation: Object, Class, Attribute, Operation, Component, Generalization, Association, Polymorphism • Strengths of Object Orientation • What is Class Diagram? • Object-oriented methodologies • Conceptual modelling • Notations in Analysis and Design Acknowledgment: The material has been compiled from many Internet sources. It has no commercial purpose. Special thanks to anonymous authors of the Rational Software Corporation, who are the original authors of many of the presented slides.

  3. Objectives: Introduction to Object Orientation • Understand the basic principles of object orientation • Define the basic concepts and terms of object orientation • Discuss the strengths of object orientation • Understand some basic UML modeling mechanisms

  4. Basic Principles of Object Orientation Object Orientation Abstraction Encapsulation Modularity Hierarchy

  5. What is Abstraction? Salesperson Customer Product

  6. What is Encapsulation? • Hide implementation from clients • Clients depend on interface

  7. What is Modularity? Order Processing System Order Fulfillment Billing Order Entry • The breaking up of something complex into manageable pieces

  8. What is Hierarchy? Increasing abstraction Decreasing abstraction • Levels of abstraction Asset BankAccount Security RealEstate Savings Checking Stock Bond Classes at the same level of the hierarchy should be at the same level of abstraction

  9. Basic Concepts of Object Orientation • Object • Class • Attribute • Operation • Component • Generalization • Association • Polymorphism

  10. What is an Object? World History 200 Music History 200 Intro to OO 180 Geology 110 Geology 110 Algebra 110 English 101 • Behavior • State • Unique identity

  11. What is a Class? World History 200 Music History 200 Intro to OO 180 Geology 110 Geology 110 Algebra 110 English 101 • An object is defined by a class CourseOffering

  12. What is an Attribute? CourseOffering :CourseOffering :CourseOffering number = 101 startTime = 900 endTime = 1100 Name = 104 startTime = 1300 endTime = 1500 number startTime endTime Object Class Attribute Attribute Value

  13. What is an Operation? CourseOffering Class addStudent deleteStudent getStartTime getEndTime Operation

  14. What Is A Component? <<subsystem>> Component Name • A non-trivial, nearly independent, and replaceable part of a system that fulfills a clear function in the context of a well-defined architecture Design Model Implementation Model Component Name Component Interface Component Interface

  15. What is Generalization? Person Trailer • One class inherits from another GroundVehicle owner ancestor weight 0..* 1 licenseNumber register( ) generalization Truck Car decendent tonnage size getTax( )

  16. What is Association? Person Person Company Company Position Association roles +employee +employer Position 0..1 * public class Person { public Company employer; } public class Company { public Vector employee; }

  17. What is Polymorphism? Manufactor A Manufactor C Manufactor A • The ability to hide many different implementations behind a single interface

  18. Strengths of Object Orientation • A single paradigm • Single language used by users, analysts, designers, implementers • Facilitates architectural and code reuse • Models more closely reflect the real world • More accurately describe corporate data and processes • Decomposed based on natural partitioning • Easier to understand and maintain • Stability • A small change in requirements does not mean massive changes in the system under development

  19. A Simple Sales Order Example Order Product Ship via

  20. What is Class Diagram? A representation of the types of objects in the system and the various kinds of static relationships that exist among them. It serves as the framework for the system design. Object - an identified, intelligent component of information system capability. Domain objects represent "things" in the world (entities). Capability - behavior that the object can perform, typically requiring variables (data attributes) and methods (procedural code). Class - a collection of objects having the same capabilities. Association - a relationship among objects Subtype Specialization (Subclasses) - subset of a class that extends its capabilities Constraint - a rule defining legal states of objects, classes, relationships, and subtypes.

  21. Class Diagram for the Sales Example Sale Salesperson Customer Product Vehicle Corporate Individual Truck Train

  22. Effect of Requirements Change Suppose the requirements for shipping by a truck change ... Sale Salesperson Customer Product Vehicle Corporate Individual Truck Train Only the Truck class changes

  23. Object-oriented methodologies Object-oriented methodologies employ the concepts of object-orientedness to conceptual modeling and to analysis and design of information systems. The main component of O-O methodologies is an object (class) diagram, which is some notational variant and extension of the popular entity-relationship diagrams. An object diagram represents: classes of objects, attributes of objects, methods that can be applied to objects, inheritance hierarchy among classes, relationships (associations, aggregations) among classes, cardinalities of these relationships, various constraints, and other information. Object diagrams are supported by: dynamic diagrams dealing with events, states and time, method passing diagrams, data flow and functional diagrams, etc. Recent O-O methodologies are driven by use case diagrams, which map the system structure and functionality form the user viewpoint.

  24. Conceptual modeling ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... mapping mapping Human perception of the problem (business) domain Abstract conceptual model of the domain Programmer’s view of data structures and operations The tendency in software modeling tools is simplifying the mappings between these three perspectives.

  25. Notations in Analysis and Design • A natural language • Graphical notations • Specifications - formalized statements Kinds of notations Graphical notations have special meaning. Software engineering follows other technological domains, such as electronics and mechanics. Advantage of graphical notations are confirmed by psychological tests. Functions of notations • Tools for analysis and design, recording ideas and results • Interaction with users of designed systems • Communication with other members of a design team • Basis for implementation of software • Documentation of projects and software

More Related