Presentation is loading. Please wait.

Presentation is loading. Please wait.

BTS430 Systems Analysis and Design using UML Domain Model—Part 2A: Attributes.

Similar presentations


Presentation on theme: "BTS430 Systems Analysis and Design using UML Domain Model—Part 2A: Attributes."— Presentation transcript:

1 BTS430 Systems Analysis and Design using UML Domain Model—Part 2A: Attributes

2 In these notes: Report Objects Attributes vs. Classes Description Classes Attributes

3 Report Objects “Report” that some action has taken place, for example as a receipt reports that a sale and payment have occurred Not generally useful since information is derived from other sources

4 Report Objects But if they have a special role in terms of business rules—e.g. need Receipt in order to get refund—then they should be included The receipt class would be added to the Domain Model when the Manage Returns use case specification was written

5 Common Mistake with Attributes vs. Classes Represent something as an attribute when it should have been a conceptual class. e.g. a sale is made at a store Sale is a conceptual class Is store an attribute of Sale or is it a conceptual class Store?

6 Common Mistake with Attributes vs. Classes GUIDELINE: If we DO NOT think of a concept as a number or text in the real world domain then it is probably a class, not an attribute In the real world, a store is not considered a number or text -- it is a legal entity, an organization, and something that occupies space. Store should be a conceptual class.

7 Description Class Contains information that describes something else. ProductDescription records the price, picture and text description of an Item We can use this to our advantage in writing the Estimate and Order use case specifications and diagramming them

8 Description Class The need for description classes is common in sales, product and services domains Common in manufacturing, which requires a description of a manufactured thing that is distinct from the thing itself.

9 Description Class Use when there needs to be a description of an item/service, independent of the current existence of any examples of those items or services e.g. design of a unique piece of furniture The piece cannot be seen in Chip’s showroom reduces redundancy/duplication

10 Description Classes Use when: Deleting instances of things they describe (for example, an item of furniture) results in a loss of information that needs to be maintained, but was incorrectly associated with the deleted thing.

11 Attributes A logical data value of an object Should be primitive data types such as numbers and Booleans

12 Guideline Very common data types include Date or DateTime Number Character String (text) Time

13 Guideline Other common data types include Address Color Geometrics (Point, Rectangle) Phone Number Social Insurance Number UPC SKU Zip or Postal codes Enumerated Types, e.g, Size ={small, large}

14 Attributes Show attributes when They are suggested by use cases or imply a need to remember information Sale has date and time Store needs a name and address

15 Guidelines “Represent what may initially be considered a number or string as a new data type class in the domain model if” it is composed of separate sections Phone number; name of a person has operations associated with it, such as parsing or validation Social insurance number

16 Guidelines “ Represent what may initially be considered a number or string as a new data type class in the domain model if” it: has other attributes Promotional price could have a start (effective) date and end date is a quantity with a unit Payment amount has a unit of currency

17 Guidelines “Represent what may initially be considered a number or string as a new data type class in the domain model if” it Is an abstraction of one or more types with some of these qualities Item identifier in the sales domain is a generalization of types such as UPC and EAN (European Article Number)


Download ppt "BTS430 Systems Analysis and Design using UML Domain Model—Part 2A: Attributes."

Similar presentations


Ads by Google