Unit 1 Object-Oriented Design Concepts
Key Concepts Development methodologies Classes and objects Attributes and methods Inheritance and polymorphism Decomposition, modularity, coupling, and cohesion Characteristics of a system Types of information systems Modeling UML diagrams Class diagrams Associations
Systems Analysis and Design? Main goal Improve organizational systems via software to help accomplish business tasks efficiently and easily Requires knowledge of: Organization’s objectives, structure, processes How to exploit information technology for advantage
1-4
1-5
1-6 What Is a System? A group of interrelated procedures used for a business function, with an identifiable boundary, working together for some purpose.
1-7
Characteristics of Systems CharacteristicDefinition ComponentsIrreducible or aggregate parts of a system (also called subsystems) InterrelationshipsAssociations and dependencies between components of a system BoundaryDivides system from environment PurposeGoal or function of a system Interfacespoints of contact between system and environment InputsData from environment to system OutputData from system to environment ConstraintsLimit to what the system can accomplish
Important System Concepts Decomposition – breaking down a system into smaller constituents Modularity – the result of decomposition; parts of a system Coupling – extent of dependencies between subsystems Cohesion – extent to which a subsystem performs a single function
Transaction Processing System (TPS) Automate the handling of data for business activities or transactions Goal: improve transaction processing by increasing speed, enhancing productivity, improving efficiency and accuracy
Management Information System (MIS) Use raw data from TPS systems, and converts them into meaningful aggregate form, resulting in summary reports Goal: provide the information that helps managers in their jobs
Decision Support System (DSS) Combine databases, mathematical or graphical models, and interactive user interfaces or dialogues allowing users to manipulate data and models Include what-if analyses, executive information systems, data warehouses, knowledge management systems Goal: support decision-making with unstructured and unpredictable problems
Evolution of System Development Methodologies SDLC Systems Development Life Cycle Structured Analysis and Design Use of Data Flow Diagrams Data-Oriented Methodology Use of Entity Relation Diagrams Object-Oriented Methodology Use of Unified Modeling Language (UML) Diagrams Agile Methodologies Adaptive, people-oriented approach
Systems Planning and Selection Analyze and arrange organization’s information needs, identify and describe potential project, determine system scope, and provide a business case for continuing with the project Feasibility analysis: determine economic and organizational impact of the system
Systems Analysis Thorough study of organization’s current system and processes, determination of system requirements, structuring requirements, generate alternative design strategies. Use of UML for system modeling Goal: describe what needs to be done
Systems Design Translating alternative solution generated by analysis phase into detailed logical and physical system specifications. Logical design: not tied to any hardware or software platform Physical design: specific programming languages, databases, architectures Goal: identify how the task will be accomplished
System Implementation and Operation Information system is coded, tested, and installed, and undergoes periodic corrections and enhancements Goal: provide a fully operational system
Iterative and Incremental Development Project is divided into phases A phase can have multiple workflows Each phase has a milestone at its end A phase can be divided into iterations Most critical or most risky pieces are developed first Rational Unified Process (RUP) defines four phases: Inception Elaboration Construction Transition
Construction is the hardest part
Key Differences Between Structured and Object- Oriented Analysis and Design StructuredObject-Oriented MethodologySDLCIterative/Incremental FocusProcesssObjects RiskHighLow ReuseLowHigh MaturityMature and widespreadEmerging Suitable forWell-defined projects with stable user requirements Risky large projects with changing user requirements
Unified Modeling Language (UML) A standard notation for representing object-oriented systems Boxes represent classes, components, packages, objects Containing attributes and operations Provide interfaces to external entities Lines represent generalization and other relationships
Sample UML Diagram
What Is an Object? An entity that encapsulates data and behavior Objects are categorized into classes Each individual object is an instance of a class
What Is a Class? A category of objects that share the same attributes, operations, relationships, and semantics All objects are instances of classes Name Attributes Operations
What Is an Attribute? Attribute- a named property of a class that describes a range of values that instances of the attribute might hold Attributes are the way classes encapsulate data
Attributes are properties containing values Minus sign indicates these are private (hidden)
What Is Encapsulation? The characteristic of object-orientation in which data and behavior are bundled into a class and hidden from the outside world Access to the data and behavior is provided and controlled through an object’s interface
What Is an Operation? A behavior of an object A method is the implementation of an operation Methods are identified and invoked by their signatures, including name, parameters, and return type
Signature has name, parameters, return type Method implements the behavior
Plus sign indicates these are public (accessible)
What Is Generalization? A relationship between a more general (or parent) class and a more specific (or child) class The more specific class has additional attributes and operations
What Is Inheritance? The mechanism by which the more specific class in a generalization relationship includes the attributes and operations of the more general class
Generalization represented by arrows from subclass to superclass Subclasses inherit all attributes and operations of superclasses
What Is Polymorphism? The ability for different classes of objects to respond to identical messages in different ways Polymorphism = “having many forms” Different behaviors for the same message
Here, each type of vehicle has its own version of calcPrice()
Polymorphism Example Dim myControl As Control For Each myControl In Me.Controls myControl.ForeColor = Color.Red Next
What Is a Component? A replaceable part of a system providing a clearly defined function through a set of interfaces Group of classes working together toward a common end; a subsystem
What Is an Interface? The mechanism by which users of a component invoke its behaviors and manipulate its properties The interface is implemented by method signatures
Interfaces are represented as small rectangles
What Is a Package? A logical grouping of related analysis or design elements Group of classes sharing similar characteristics or purposes
Package is to component as folder is to file
What Is an Association? A relationship or link between instances of (or objects) of classes Three types: Simple associations: no ownership Aggregations: part-whole relationships where the part can exist independently of the whole, but the whole is meaningless without the parts Compositions: part-whole relationships where the part and the whole are fully dependent on each other
Diagramming Associations This is a binary association, showing roles and multiplicities roles multiplicities
Systems Modeling Systems modeling – creating an abstraction of a system Abstraction – focusing on the relevant aspects and ignoring other details UML is a modeling approach, involving these diagrams: Use-case, sequence, communication, class, object, activity, state, composite structure, package, component, deployment
UML Diagrams DiagramDefinition Use-case diagramshows use cases, actors, and relationships describing user interactions with system Sequence diagram shows interactions of objects via message-passing in time-ordered manner Communication diagram similar to sequence diagram, but without the time-ordering Class diagramshows set of classes and relationships (generalizations and associations) Object diagramshows specific instances of a class diagram Activity diagramdata from environment to system
UML Diagrams DiagramDescription State diagramshows transitioning of an object from state to state in response to events Composite structure diagram shows how a component whole is made up of its parts Package diagramshows logical grouping of analysis or design elements Component diagram shows software components or modules and their relationships Deployment diagram shows configuration of runtime processing nodes and their components