MCS 270 Spring 2014 ObjectOriented Software Development MCS
MCS 270 Spring 2014 Object-Oriented Software Development
MCS 270 Object-Oriented Software Development Today’s schedule Chapters 12 -13: (Part I) Domain Analysis Application Analysis GUSTAVUS ADOLPHUS COLLEGE gustavus. edu
MCS 270 Object-Oriented Software Development Domain Analysis (Chap 12) Domain Analysis: devising a precise, concise, understandable and correct model of the domain of the application. Flows from requirements statement Entails identification of classes, associations between classes, and attributes of classes Create model of (mostly) static components Intrinsic Analysis GUSTAVUS ADOLPHUS COLLEGE gustavus. edu
MCS 270 Object-Oriented Software Development Application Analysis (Chap 13) Application Analysis: devising a precise, concise, understandable and correct model of the interactions of the application. Flows from Use Case analysis Entails identification of actors, use cases, external events, flow – Activity Diagrams Create model of (mostly) interactive components Extrinsic Analysis Note: We have done some of this work already for Gus. List GUSTAVUS ADOLPHUS COLLEGE gustavus. edu
MCS 270 Object-Oriented Software Development Domain Class Analysis Find classes Prepare a data dictionary Find associations Find attributes of objects and links Organize and simplify classes using inheritance Verify that access paths exist for likely queries Iterate and refine the model. GUSTAVUS ADOLPHUS COLLEGE gustavus. edu
MCS 270 Object-Oriented Software Development Finding Classes arise from the problem domain Some may be concrete Others may be abstract Some may be stated explicitly Others may be implicit General rule: look for nouns GUSTAVUS ADOLPHUS COLLEGE gustavus. edu
MCS 270 Object-Oriented Software Development GUSTAVUS ADOLPHUS COLLEGE gustavus. edu
MCS 270 Object-Oriented Software Development Finding Classes Don’t worry about superclass-subclass relationships at first Just try to identify base classes that may be in horizontal relationships with each other The book uses a banking example based on ATM transactions GUSTAVUS ADOLPHUS COLLEGE gustavus. edu
MCS 270 Object-Oriented Software Development GUSTAVUS ADOLPHUS COLLEGE gustavus. edu
MCS 270 Object-Oriented Software Development Eliminating/Reducing Classes Redundant classes: Customer and User are redundant Customer is kept because it’s more descriptive Irrelevant classes: Cost is outside scope of app Vague classes: Record. Keeping. Provision, System, Banking Network, Security Provision Attributes: Account. Data is attribute of Account, Receipt, Cash are attributes of Transaction GUSTAVUS ADOLPHUS COLLEGE gustavus. edu
MCS 270 Object-Oriented Software Development Eliminating/Reducing Classes Operations: things that you identify as nouns, but which are really methods within classes. E. g. Log. On Roles: User is really a role, Customer is better choice Implementation: Transaction. Log is a record of transactions – will be implemented as some ADT, but depends on prog. language (List, Array, etc) Derived Classes: E. g. Buyer, Seller are sub-classes of Customer GUSTAVUS ADOLPHUS COLLEGE gustavus. edu
MCS 270 Object-Oriented Software Development GUSTAVUS ADOLPHUS COLLEGE gustavus. edu
MCS 270 Object-Oriented Software Development Domain Class Analysis Find classes Prepare a data dictionary Find associations Find attributes of objects and links Organize and simplify classes using inheritance Verify that access paths exist for likely queries Iterate and refine the model. GUSTAVUS ADOLPHUS COLLEGE gustavus. edu
MCS 270 Object-Oriented Software Development Data Dictionary Precise (paragraph) description of each class. Scope of current problem. Associations, Attributes, Operations, enumeration values, assumptions and restrictions. Example: Account: A single account at a bank against which transactions can be applied. Accounts can be of various types, including checking and saving. A customer can hold more than one account. GUSTAVUS ADOLPHUS COLLEGE gustavus. edu
MCS 270 Object-Oriented Software Development Domain Class Analysis Find classes Prepare a data dictionary Find associations Find attributes of objects and links Organize and simplify classes using inheritance Verify that access paths exist for likely queries Iterate and refine the model. GUSTAVUS ADOLPHUS COLLEGE gustavus. edu
MCS 270 Object-Oriented Software Development Domain Class Analysis Association: structural relationship between two or more classes. Eg. Relate PERSON and COMPANY with the association ‘WORKFOR’ Keeping the right Association Discard unnecessary and incorrect associations: Association between eliminated classes, Irrelevant or implementation associations (Creating a List), Actions, Derived association (subclass). -- More detail can be found in textbook. GUSTAVUS ADOLPHUS COLLEGE gustavus. edu
MCS 270 Object-Oriented Software Development GUSTAVUS ADOLPHUS COLLEGE gustavus. edu
MCS 270 Object-Oriented Software Development Domain Class Analysis Find classes Prepare a data dictionary Find associations Find attributes of objects and links Organize and simplify classes using inheritance Verify that access paths exist for likely queries Iterate and refine the model. GUSTAVUS ADOLPHUS COLLEGE gustavus. edu
MCS 270 Object-Oriented Software Development Domain Class Analysis Attributes: Data properties of individual objects. Keeping the Right Attribute Only consider attributes directly relevant to the application. GUSTAVUS ADOLPHUS COLLEGE gustavus. edu
MCS 270 Object-Oriented Software Development Domain Class Analysis Incorrect Attributes: Object: Should be represented as association Qualifier: Person has employye. Number attribute. Should be new class called Employee Unique Name or Identifier: Not part of design Internal values: Not visible/useful outside class Fine detail: int used in loop, etc. Note: These are most important cases -- book has others that are somewhat esoteric GUSTAVUS ADOLPHUS COLLEGE gustavus. edu
MCS 270 Object-Oriented Software Development GUSTAVUS ADOLPHUS COLLEGE gustavus. edu
MCS 270 Object-Oriented Software Development Architectural design Architecture is a high-level representation of S/W Architectural styles are templates, e. g. , Data-centered Data-flow Call and return Object-oriented Layered Note: Choice of architecture has implications for domain class model GUSTAVUS ADOLPHUS COLLEGE gustavus. edu
MCS 270 Object-Oriented Software Development Architectural Styles Data-centered – subsystems interact through single repository Model / View / Controller Call and return (Client / Server) Layered (three-tier, four-tier) Data-flow (pipe and filter) GUSTAVUS ADOLPHUS COLLEGE gustavus. edu
MCS 270 Object-Oriented Software Development Model / View / Controller (MVC) MVC: Model maintains domain knowledge (data) View subsystems display it to the user Controller subsystems manage sequence of interactions with user Note: M doesn’t depend upon V or C Well-suited for interactive systems GUSTAVUS ADOLPHUS COLLEGE gustavus. edu
MCS 270 Object-Oriented Software Development Domain Model Exercise Groups of 3 -4: Create a Domain Model analysis of “Gus. List” – an on-line classified ad service for the Gustavus community. Task: Identify Classes Associations Attributes Assumptions: We will use the MVC architecture Assignment: By next Thursday (March 6), prepare (group) a Domain Model Class Diagram with all associations and attributes, plus a Data Dictionary. GUSTAVUS ADOLPHUS COLLEGE gustavus. edu
MCS 270 Object-Oriented Software Development Assignments Tuesday – In Lab for Project: Homework: Gus. List Use Case Report Due: Tuesday, Feb. 25 Gus. List Domain Class Model Due: Thursday, March 6 GUSTAVUS ADOLPHUS COLLEGE gustavus. edu
- Slides: 26