Presentation is loading. Please wait.

Presentation is loading. Please wait.

Design CIS 4800 Kannan Mohan Department of CIS Zicklin School of Business, Baruch College Copyright © 2009 John Wiley & Sons, Inc. Copyright © 2008 Course.

Similar presentations


Presentation on theme: "Design CIS 4800 Kannan Mohan Department of CIS Zicklin School of Business, Baruch College Copyright © 2009 John Wiley & Sons, Inc. Copyright © 2008 Course."— Presentation transcript:

1 Design CIS 4800 Kannan Mohan Department of CIS Zicklin School of Business, Baruch College Copyright © 2009 John Wiley & Sons, Inc. Copyright © 2008 Course Technology Copyright © 2009 Kannan Mohan

2 Learning Objectives Explain verification and validation of the analysis models. Transition from analysis to design. Use package diagrams to organize your model.

3 Overview Programmers use models to code the system Two most important models are – Design class diagrams – Interaction diagrams (sequence diagrams and communication diagrams) Analysis class diagrams are further developed with design classes

4 Components Requiring Systems Design

5 Object-Oriented Event-Driven Program Flow

6 Analysis and Design Models

7 Sources of Classes Problem domain Solution domain Analysis classes Design classes

8 Stereotypes for Design Classes

9 Standard Design Classes Entity – design identifier for problem domain class – Persistent class – models data that exist after system is shut down or specific processes are completed Boundary – designed to live on system’s automation boundary – User interface classes Control – mediates between boundary and entity classes, between the view layer and domain layer Data access – retrieve from and send data to database

10 Three Tier Architecture MVC – Model View Controller – Model – data and associated rules – View – Presentation – Controller – Application logic

11 Three Tier/Client-Server Architecture Layers can reside on one processor or be distributed to multiple processors Data layer – manages stored data in databases Business logic layer – implements rules and procedures of business processing View layer – accepts user input and formats and displays processing results

12 Package A general construct that groups units together Used to reduce complexity of models A package diagram shows packages only So using packages we can group M, V, & C

13 Partial Design of a Three-Layer Package Diagram – Order Management System Example

14 Example Continued…

15 High Cohesion, Low Coupling High cohesion: – Each class should have a set of operations that support the intent of the class, no more and no less – Each class should model a single abstract concept – If a class needs to have many responsibilities, then some of these should be implemented by “helper” classes. The class then delegates to its helpers Low coupling: – A particular class should be associated with ‘just enough’ other classes to allow it to realise its responsibilities – Associate classes only if there is a true semantic link between them – Never form an association just to reuse a fragment of code in another class – Use aggregation rather than inheritance

16 Getting Inheritance Right Can an employee – – Switch between jobs? – Have multiple jobs? Vs.

17 Multiple Inheritance vs. Aggregation

18 More on Relationships: From Analysis to Design… Association classes are not directly implementable Importance of role names Inheritance – some languages might not support this Importance of multiplicity Implementing aggregation

19 Implementing Association Classes

20 Interfaces An interface specifies a named set of public features It separates the specification of functionality from its implementation An interface defines a contract that all realizing classifiers must conform to Interface specifiesRealizing classifier operationMust have an operation with the same signature and semantics attributeMust have public operations to set and get the value of the attribute. The realizing classifier is not required to actually have the attribute specified by the interface, but it must behave as though it has associationMust have an association to the target classifier. If an interface specifies an association to another interface, then the implementing classifiers of these interfaces must have an association between them

21 An Interface Example Login interface defines public methods that are implemented in Authentication class Design by contract

22 Summary What are Design classes and where do they come from? What is the three tier architecture? What are some of the characteristics of good design classes? Compare and contrast the use of inheritance with aggregation


Download ppt "Design CIS 4800 Kannan Mohan Department of CIS Zicklin School of Business, Baruch College Copyright © 2009 John Wiley & Sons, Inc. Copyright © 2008 Course."

Similar presentations


Ads by Google