Partial preview of the text
Download Software Engineering and Project Management - Module 2 and more Study notes Software Engineering in PDF only on Docsity!
Software Engineering & Project Management Presented By: Dr. Prakhyath Rai Module 2 introduction, Modelling Concepts and Class Modelling: What is Object orientation? What is OO development? OO Themes; Evidence for usefulness of OO development; OO Modelling history. Modelling as Design technique: Modelling, abstraction, The Three models. Class Modelling: Object and Class Concept, Link and associations concepts, Seneralization and Inheritance, A sample class model, Navigation of class models, and UML diagrams. Building the Analysis Models: Requirement Analysis, Analysis Model Approaches, Data Modelling Concepts, Object Oriented Analysis, Scenario-Based Modelling, Flow-Oriented Modelling, class Based Modelling, Creating a Behavioural Model. Introduction Object oriented means organizing software as a collection of discrete objects that incorporate both data structure and behaviour. Characteristics of OO approach: « Identity - Data is quantized into discrete, distinguishable entities called object. EXamples! first paragraph, a white rook etc. « Classification - Objects with the same data structure (Attributes) and behaviour (Operations) are grouped into a class. ERaMmples! Student, Paragraph « Inheritance - Sharing of attributes and operations (Features) among classes based on a hierarchical relationship. A superclass has general information that subclass refine and elaborate. Examples Window (Superclass) -> ScrollingWindow + FixedWindow (Subclasses) « Polymorphism - Same operation may behave differently for different classes. EXample! Move operation of Queen and Move operation of Pawn. Operation: Procedure or transformation an object performs or subjected to Method: An implementation of an operation by a specific class olymorphism - Ability of different objects to response same message in different ways. )O Development evelopment — Software lifecycle: Analysis, Design, and Implementation ssence of OO Development — Identification and Organization of application concepts instead of final presentation in programming language O Concepts apply throughout the system development life cycle - from analysis through design to nplementation Modelling Concepts, Not Implementation " Addressing frontend conceptual issues rather than backend implementation details * Serves as a medium for specification, analysis, documentation, interfacing and development « Aids specifiers, developers and customers express abstract concepts clearly and facilitates communication 00 Methodology « System Conception - Starts with conceiving an application and formulating requirements « Analysis - Analysts scrutinizes and rigorously restates requirements by construction models from system conception OO Themes 1. Abstraction « Abstraction means focusing on what an object is and does, before deciding how to implement it. « Focussing on what an object is and does, before deciding on implementation 2. Encapsulation « Information Hiding - separates the external aspects of an object that are accessible to other objects, from the internal implementation details that are hidden from other objects. 3. Combining Data and Behaviour « The caller of an operation need not consider how many implementations exist. " Operator polymorphism shifts the burden of deciding what implementation to use from the calling code to the class hierarchy. Abstraction An abstraction includes the essential details relative to the perspective of the viewer Encapsulation Encapsulation hides the details of the implementation of an object. OO Themes 4. Sharing * 00 technologies promote sharing at different levels. « Inheritance of both data structure and behaviour lets subclasses share common code. This sharing via inheritance is one of the main advantages of OO languages. * OO development not only lets you share information within an application but also offers the prospect of reusing designs and code on future projects. 5. Emphasis on the Essence of an Object * 00 technology stresses what an object is, rather than how it is used. The uses of an object depend on the details of the application and often change during development. 6. Synergy « Identity, classification, polymorphism and inheritance characterize OO languages. Each of these concepts can be used in isolation but together they complement each other synergistically. The Three Models Model a system with related but different viewpoints 1. Class Model « Represents the static, structural and data aspects of a system 2. State Model « Represents the temporal, behavioural, contro! aspects of a system 3. Interaction Model « Represents the collaboration of individual objects, interaction aspects of a system » The 3 kinds of models separate a system into distinct views. » Example: Class model attaches operations to classes and state and interaction models elaborate the operations Relationship among the Three Models Class Model " The Class model describes data structure on which the state and interaction models operate. « The operations in the class model corresponds to events and actions. State Model « The state model describes the control structure of objects. " The state model shows decisions that depend on object values and causes actions that change object values and state. Interaction Model « The interaction model focusses on the exchanges between objects and provides a holistic overview of the operation of a system. Class Modelling - Concepts "Class & Object Diagram « Generalization and Inheritance « Association & Links " Overriding Features « Multiplicity « Multiplicity & Visibility of Attributes « Association End Names « Association Classes " Qualified Associations " Ordering, Bags & Sequence Class diagrams A class is a description of a set of objects that share the same attributes, operations, relationships, and semantics. Graphically, a class is rendered as a rectangle, usually including its name, attributes, and operations in separate, designated compartments. Person | JoeSmith:Person MarySharo:Pereon | -Person Wo ‘ * —- -—— ¥ Class Objects Conventions used (UML): * UML symbol for both classes and objects is box. * Objects are modeled using box with object name followed by colon followed by class name, Both the names are underlined. * Use boldface to list class name, center the name in the box and capitalize the first letter. Use singular nouns for names of classes. * To run together multiword names (such as JoeSmith), separate the words With intervening capital letter. Person JoeSmith:Person || _ MarvSharp:Person name="Mary Sharp” birthdate=16 March 1950 | name: string . name="Joe Smith’ birthdate: date birthdate=21 October 1983 ~ e ~~ ee ~ ¢ Class with Attributes Objecis with Values Conventions used (UML): List attributes in the 2nd compartment of the class box. A colon precedes the type, an equal sign precedes default value. Show attribute name in regular face, left align the name in the box and use small case for the first letter. Similarly we may also include attribute values in the 2nd compartment of object boxes with same conventions.