Ch4: Software Architecture and Design. 1 How to choose objects and classes  The first and most often raised concern for newcomers to OO concepts  Typical.

Slides:



Advertisements
Similar presentations
Ch4: Software Architecture and Design. 1 Object-oriented paradigm  Object-oriented decomposition:  Agents comprised of two parts:  Hidden implementation:
Advertisements

REUSE--1 A Framework, Methodology and Tool for Reusable Software Components Prof. Steven A. Demurjian Computer Science & Engineering Department The University.
OBJECT ORIENTED PROGRAMMING M Taimoor Khan
Chapter 22 Object-Oriented Systems Analysis and Design and UML Systems Analysis and Design Kendall and Kendall Fifth Edition.
Introduzione ai casi d’uso  Adriano Comai 1999 Pag. 1 Use Cases: an Introduction  Adriano Comai 1999.
Ch4: Software Architecture and Design. 1 Specialization and generalization inheritance  Specialization:  Generalization  General parent class customized.
Slide 1 Systems Analysis & Design CS183 Spring Semester 2008 Dr. Jonathan Y. Clark Course Website:
Slide 1 Chapter 7 Structural Modeling. Slide 2 Key Ideas A structural or conceptual model describes the structure of the data that supports the business.
Lecture 4 Class Responsibility Collaboration Cards
6/8/991 Analysis Tuesday 09/14/99 Revised: September 11, 2000 (APM)
Copyright ©2004 Cezary Z Janikow 1 Use Cases n Within Requirements discipline/workflow n Verbal descriptions of important functional (behavioral, transactional,
Requirements Analysis 2 What objects collaborate to achieve the goal of a use case?
7. 2Object-Oriented Analysis and Design with the Unified Process Objectives  Detailed Object-Oriented Requirements Definitions  System Processes—A Use.
Marcelo Santos – OOAD-CDT309, Spring 2008, IDE-MdH 1 Object-Oriented Analysis and Design - CDT309 Period 4, Spring 2008 More on use cases System sequence.
UTECA 3/26/99 CSE.RU-1.1 Object-Oriented Design Methodology to Facilitate Reuse Prof. Steven A. Demurjian and Dr. Margaretha W. Price† Computer Science.
Domain Modeling (with Objects). Motivation Programming classes teach – What an object is – How to create objects What is missing – Finding/determining.
Page 1 ISMT E-120 Desktop Applications for Managers Introduction to Microsoft Access.
Chapter 9 Domain Models. Domain Model in UML Class Diagram Notation A “visual dictionary”
OO Analysis and Design CMPS OOA/OOD Cursory explanation of OOP emphasizes ▫ Syntax  classes, inheritance, message passing, virtual, static Most.
Designing Classes OO Software Design and Construction Computer Science Dept Va Tech January 2002 ©2002 McQuain WD & Keller BJ 1 Designing the Classes Once.
What is a domain model? “A domain model captures the most important types of objects in the context of the business. The domain model represents the ‘things’
CSE 441: Systems Analysis & Design
CST203-2 Database Management Systems Lecture 2. One Tier Architecture Eg: In this scenario, a workgroup database is stored in a shared location on a single.
1 CMPT 275 Software Engineering Requirements Analysis Phase Requirements Analysis Activity (Identifying Objects, Scenarios) Janice Regan,
DOMAIN MODEL— PART 2: ATTRIBUTES SYS466. Looking For Potential Classes “Know the business”. Ask Questions Identify business concepts; filter nouns (person,
Copyright 2002 Prentice-Hall, Inc. Chapter 2 Object-Oriented Analysis and Design Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey.
Slide 1 Structural Modeling Chapter 7. Slide 2 Key Ideas A structural or conceptual model describes the structure of the data that supports the business.
Approaching a Problem Where do we start? How do we proceed?
Object oriented classification Classification is the process of checking to see if an object belongs to a category or a class, is regarded as a basic attribute.
Systems Analysis and Design in a Changing World, 3rd Edition
Conceptual Modeling Modeling the Problem Domain. Conceptual Modeling Decompose problem space into comprehensible concepts. Clarify the terminology or.
UML-1 3. Capturing Requirements and Use Case Model.
SYS466: Analysis and Design Using OO Models Domain Class Diagram.
1 What is OO Design? OO Design is a process of invention, where developers create the abstractions necessary to meet the system’s requirements OO Design.
Discovering object interaction. Use case realisation The USE CASE diagram presents an outside view of the system. The functionality of the use case is.
Structural Modeling Chapter 7. Key Ideas A structural or conceptual model describes the structure of the data that supports the business processes in.
1 Structural Modeling Chapter 7. 2 Key Ideas A structural or conceptual model describes the structure of the data that supports the business processes.
BTS430 Systems Analysis and Design using UML Domain Model—Part 2: Associations and Attributes.
Domain Model—Part 2: Attributes.  A logical data value of an object  (Text, p. 158)  In a domain model, attributes and their data types should be simple,
Data Abstaraction Chapter 10.
Object-Oriented Modeling: Static Models. Object-Oriented Modeling Model the system as interacting objects Model the system as interacting objects Match.
Software Architecture Evaluation Methodologies Presented By: Anthony Register.
CMSC 202 A Design Exercise. 2 OO design activities Finding the Objects Defining the responsibilities –Services –Attributes Discovering relationships.
BTS430 Systems Analysis and Design using UML Domain Model—Part 2A: Attributes.
Domain Model A representation of real-world conceptual classes in a problem domain. The core of object-oriented analysis They are NOT software objects.
BTS430 Systems Analysis and Design using UML Domain Model—Part 2: Associations and Attributes.
Design. 2 The Need for Software Blueprints Knowing an object-oriented language and having access to a library is necessary but not sufficient in order.
UML - Development Process 1 Software Development Process Using UML.
Object Oriented Programming. OOP  The fundamental idea behind object-oriented programming is:  The real world consists of objects. Computer programs.
Ch4: Software Architecture and Design. 1 Categories of classes Data Managers: class Item { private: // Private Data int UPC; char* Name; int InStock,
OO DomainModeling With UML Class Diagrams and CRC Cards Chapter 6 Princess Nourah bint Abdulrahman University College of Computer and Information Sciences.
Identification of Classes. Object Oriented Analysis (OOA) OOA is process by which we identify classes that play role in achieving system goals & requirements.
Class Diagrams Revisited. Parameterized Classes Parameterized Classes - are used to represent relationships between templates.
Rationale Databases are an integral part of an organization. Aspiring Database Developers should be able to efficiently design and implement databases.
Requirements capture: Using UML Use Cases David Millard and Yvonne Howard {dem,
Elements Of Modeling. 1.Data Modeling  Data modeling answers a set of specific questions that are relevant to any data processing application. e.g. ◦
 The Object Oriented concepts was evolved for solving complex problems. Object- oriented software development started in the 1980s. Object-oriented design.
Entity-Relationship Model
Chapter 9 Domain Models.
UNIT 1.
Object-Oriented Analysis and Design
Conception OBJET GRASP Patterns
Object Oriented Concepts -I
OO Domain Modeling With UML Class Diagrams and CRC Cards
OO Domain Modeling With UML Class Diagrams and CRC Cards
Object-Oriented Analysis
Entity Relationship Diagrams
Copyright 2007 Oxford Consulting, Ltd
4: Object-oriented Analysis & Design
Chapter 22 Object-Oriented Systems Analysis and Design and UML
Presentation transcript:

Ch4: Software Architecture and Design

1 How to choose objects and classes  The first and most often raised concern for newcomers to OO concepts  Typical answers:  Better answer:

2 How to choose objects and classes (contd..)  Employee class  Private data:  Public interface:  Based on an information perspective, focusing on the idea that to track Employees a set of standard data and operations are needed.

3 How to choose objects and classes (contd..)  ATM_log class:  Private data:  Public interface:  Embodies the functions that take place to authenticate an individual to an ATM session.  Even with a functional view, information is needed to capture user input for verifying status.

4 How to choose objects and classes (contd..)  ATM_User:  Private data:  Public interface:  User interface by capturing the different interactions between the ATM and the user.

5 How to choose objects and classes (contd..) An appointments system that will allow telephone callers to book an appointment with a doctor. The caller will specify the day and the time when he wishes to be seen by a doctor.  Tentative classes could be:

6 How to choose classes and objects (contd..)  Redundancy:  Discard nouns outside the system domain  Vagueness:  Attributes:

7 How to choose classes and objects (contd..)  Operations:

8 How to choose objects and classes (contd..)  Attributes are properties of individual objects  Can be  Nouns followed by “of the” (E.g. day “of the” appointment)  Adjectives - color, number, state (on/off)  May not be fully described  Guidelines for identifying attributes:  Attributes that are directly relevant to the problem. Something can be an attribute in one context and an object in another e.g city.  Give them meaningful names.  Avoid attributes that are purely involved in implementation e.g an id number that is generated by the machine and has meaning only within the application.  Avoid attributes that can be derived from existing information e.g. age can be derived from date of birth  Different and unrelated attributes in a class may suggest that the class is a composite of a number of classes. Useful to divide such a class into a number of separate classes.

9 How to choose objects and classes (contd..)  Identifying operations:  Attributes:  Events in the scenarios:  A scenario consists of interactions (events exchanged) that have to take place among the objects to achieve the functionality.  Identify common and rare scenarios.  Events passed to and from the objects implies operation on the object or message from it.

10 How to choose objects and data (contd..)  Real world can also suggest the operations needed to support a class :  Operations should not overlap each other:  Number of operations that have access to the data should be reduced to a minimum.  Operations may refer to verbs in the problem description

11 High-Tech Supermarket System (HTSS)  Automate the functions and actions:  Cashiers and inventory updates  User friendly grocery item locator  Fast-track deli orderer  Inventory control  User system interfaces  Cash register/UPC scanner  GUI for inventory control  Shopper interfaces locator and orderer  Deli interface for deli workers

12 HTSS (contd..) IC IC CR CR CR CR IL IL IL SDO SDOEDO EDO Order Payment Item ItemDBLocalServer Non-Local Client Int. InventoryControl ItemDBGlobalServerOrderDB SupplierDB CreditCardDB ATM-BanKDB IL: Item Locator CR: Cash Register IC: Invent. Control DO: Deli Orderer for Shopper/Employee Shopper/Employee

13 Classes in the HTSS  Nouns:  Noun extraction:  Do we need classes for customers/shoppers?  Nouns such as aisle, shelf, UPC, etc. do not have any independent existence, in fact, they represent attributes of item.

14 Classes in HTSS  A class based on knowledge of the problem domain:  Receipt  There are other kinds of classes, mostly in the solution domain (do not represent any physical entity or a concept in the problem domain), that noun extraction does not reveal.  Classes to represent GUIs.  Collection classes such as linked lists, queues, stacks  Attributes based on domain knowledge:  Retail cost, whole sale cost, etc.

15 Item class in HTSS  Item class  Attributes:  Operations:

16 Categories of classes Data Managers: class Item { private: // Private Data int UPC; char* Name; int InStock, OnShelf, ROLimit; float RetailCost; public: // Public Methods Item(int code, char* str, int st1, int st2, int st3, float cost); void CreateNewItem(); int GetUPC(); char* GetName(); int GetQuantity(); int CheckReorderStatus(); void PrintItem(); void UpdatePrice(float new_value); };

17 Categories of classes (contd..) class ItemDB {private: int Num_Items; int Curr_Item; Item* AllItems[Max_Items]; int FindFirstItem(); int FindNextItem(); int FindItemUPC(int code); int FindItemName(char* name); public: ItemDB(); // Constructor void InsertNewItem(Item* new_one); void DeleteExistingItem(int code); void FindDisplayItemUPC(int code); void FindDisplayItemName(char* name); void PrintAllItems(); }; Data sinks/data sources:

18 Categories of classes (contd..) I1 “milk” I2 “peas” I3 “soda” ItemDB Data Manager class Data Source/Sink class Data Source/Sink class is added for implementation.

19 Categories of classes (contd..) View/Observer: Provide an interface for user - class InvControlGUI { private: int Curr_Option; // Current menu option public: InvControl(); // Constructor void PrintMenuSetOption(); void ActivateController(); void EnterNewItem(); void RemoveExistingItem(); void FindItem(); void InvSearchQuantity(); void InvSearchReorder(); void GenerateAnOrder(); };

20 Categories of classes (contd..)  Facilitator/Helper – Used to support complex tasks  For HTSS, Facilitator/Helpers are as follows: