1
CONCEPTUAL DESIGN:
OBJECT TECHNOLOGY
CONCEPTS and
UML CLASS DIAGRAMS
2
1. Identify the information system’s purpose
2. Identify the information system’s actors and features
3. Identify Use Cases and create a Use Case Diagram
4. Identify Objects and their Classes and create a Class Diagram
5. Create Interaction/Scenario Diagrams
6. Create Detail Logic for Operations
7. Repeat activities 1-6 as required to refine the “blueprints”
A Simplified Object-OrientedSystems Analysis & Conceptual Design Methodology
Activities
3
Object-Oriented Technology Concepts
• Object
• Class
• Attributes
• Operations
• Relationships
• Messages
• Persistence
• State
4
Defining ObjectsAn OBJECT is an abstraction of a person, place,thing, or concept within the problem domain thatthe information system must be aware of.
...Objects are “instantiated” (created)
...the term “instance” is interchangeable with “object”
5
Defining ClassA CLASS is a template (specification, blueprint)for a collection of objects that share a commonset of attributes and operations.
HealthClubMemberClass
Objects
attributesoperations
6
• Objects have three responsibilities:
What they know about themselves – (e.g., Attributes)
What they do – (e.g., Operations)
What they know about other objects – (e.g., Relationships)
Objects
7
•Attributes (aka: properties, characteristics)
An ATTRIBUTE is data that further describes an object instance.
HealthClubMember
Class
Objects
• attributes• firstName• lastName• etc...
• operations
firstName lastNameMary SmithSusan JonesJeff Normanetc...
8
An example ofa Class showingAttribute Namesand their Values
studentName address shoeSize eyeColor weight dateOfBirthSusan McIntyre
Greg Fisher
Minder Chen
Sally Athey
Laura Applegate
Margie Heltne
Bill Martz
Anna Easton
123 Franklin St.San Diego CA765 Park Ave.San Diego CA222 Dallas St.La Mesa CA862 Grand Ave.Pacific Beach CA914 GarnettLa Jolla CA479 55th St.El Cajon CA876 BalboaMission Beach CA309 Del Mar Hts.Del Mar CA
11
10
9.5
6
5
5.5
10.5
6
Blue
Brown
Brown
Brown
Blue
Brown
Blue
Brown
175
170
140
125
110
105
190
120
4-12-74
12-2-73
10-5-76
6-28-75
3-15-74
5-22-75
1-26-70
8-14-74
StudentInformationstudentNameaddressshoeSizeeyeColorweightdateOfBirthetc...
operations
Class “template”
8 Object ExamplesWith
Attribute Values
9
Candidate Attributes Necessary AttributesstudentSocialSecurityNumberstudentFirstNamestudentMiddleInitialstudentLastNamestudentAddressstudentCitystudentStatestudentZipcodestudentTelephoneyearGradFromHighSchoolhighSchoolGradePointAvgsATScorehobbiessportsreligiousPreferencemedicalConditionheightweightshoeSizehairColoreyeColorgenderetc...
StudentInformationattributes
studentSocialSecurityNumberstudentFirstNamestudentMiddleInitialstudentLastNamestudentAddressstudentCitystudentStatestudentZipcodestudentTelephoneyearGradFromHighSchoolhighSchoolGradePointAvgsATScore
religiousPreferencemedicalCondition
genderetc...
ANALYSIS
operations
What are the necessary attributes?
10
Single-Valued Attributes Example
studentName studentIDNumber eyeColor height weight dateOfBirth
Susan McIntyre
Bill Martz
Blue
Brown
155
118
4-12-74
12-2-73
559-46-0912
371-38-7640
5ft 9in
5ft 6in
(each object has one and only one value for each attribute at any moment in time)
Mutually Exclusive Attribute Values Example
employeeName employeeNumber hourlyRate weeklySalary
Susan McIntyre
Bill Martz
$9.75559-46-0912
371-38-7640 $475.00
mutually exclusive attributes with values
(the presence of an object’s attribute value necessitates the absence of a value for another attribute value for the same object)
11
studentName studentIDNumber collegeAttended collegeGradePointAvg
Multi-Valued Attributes ExamplestudentName studentIDNumber collegeAttended collegeGradePointAvgSusan McIntyre
Bill Martz
Maria Carey
Grossmont C.C.Point Loma
NY Univ.
Golden GateGeorgia StateU of San Diego
559-46-0912
371-38-7640
270-73-9815
2.92.7
3.2
2.22.93.1
multi-valued attributes with values
Susan McIntyreSusan McIntyre
Bill Martz
Maria CareyMaria CareyMaria Carey
Grossmont C.C.Point Loma
NY Univ.
Golden GateGeorgia StateU of San Diego
559-46-0912559-46-0912
371-38-7640
270-73-9815270-73-9815270-73-9815
2.92.7
3.2
2.22.93.1
Notice the redundancy of data values for these two attributes
12
StudentInformation
operations
studentNamestudentIDNumbercollegeAttendedcollegeGradePointAvg
StudentInformation
operations
studentNamestudentIDNumber
CollegeAttended
operations
collegeAttendedcollegeGradePointAvg
1
0,m
(original model) (revised model)
Susan McIntyre
Bill Martz
Maria Carey
559-46-0912
371-38-7640
270-73-9815
Grossmont C.C.Point Loma
NY Univ.
Golden GateGeorgia StateU of San Diego
2.92.7
3.2
2.22.93.1
collegeAttended gradePointAvg
studentName studentIDNumber
13
•Operations (aka: methods, services, behavior)
An OPERATION is a procedure that an object can perform.
HealthClubMember
Class
Objects
• attributes• firstName• lastName• etc...
• operations• joinClub• payFees• monitorWorkout• etc...
“I do it myself”
An object’s “motto”:
14
• RelationshipsA RELATIONSHIP is what a class or an object
knows about another class or object.
Generalization[-Specialization] (Superclass/Subclass)
• Inheritance• Ex: Person - FacultyPerson, StudentPerson, Staff...
• Ex: ModesOfTravel - Airplane, Train, Auto, Cycle, Boat...
[Object] Associations• FacultyInformation - CourseInformation• StudentInformation - CourseInformation
[Object] Aggregations & Composition (Whole-Part)
• Assembly - Parts• Group - Members• Container - Contents
T h
r e
e
T y
p e
s
15
• Relationships
1) show relationships 2) enforce integrity 3) help produce results
• Removal of a course should also remove students that are in the course but not student information.
• Removal of a student should also remove students that are in courses but not course information.
• Removal of a student in a course should not affect either course or student information.
1
0,m
UniversityCourse
StudentInCourse
StudentInformation
1
0,m
Exist to:
In this example:
16
• MessagesA MESSAGE is a signal from one object to
another that requests the receiving object to carry out one of its operations.
Three parts to a Message:
1. The name of the receiver object
2. The operation to carry out
3. Any parameters the operation may
require to fulfill its duties
Message: getFrozenYogurt
operation: getFrozenYogurt($$)
“The operation
is the message.”
17
VCR Example
VCR Class Definition
VCR Object
Universal Remote Control
T.V. Object
PlayPlay Message
18
• PersistencePERSISTENCE is the equivalent of more
permanent, long-term data storage.
• StateSTATE represents the condition of an object at a specific moment in time.
Time Account Balance6:00pm $2,5006:05pm $2,200 (something changed its state)
19
Getting Started!
Getting Started!
Getting Started!
Getting Started!
Getting Started!
Getting Started!
20
GETTING STARTED with the CLASS DIAGRAM
OBJECTS!
(CLASSES)
Features?
Data?
User Behavior?
21
UML Class Diagram Notation
Member
memberNumberfirstNamelastNametelephoneaddresscityetc...
checkOutVideocheckInVideobuyItemetc...
attributes
operations
{{
Expanded view of a
Class into its three
sections:
Top: Class Name
Middle: attributes
Bottom: operations
Class
22
Playing Card Illustration of Class Symbol
Deckof 52
PlayingCards
. ..
..
card #1card #2
card #3card #4
card #52
Class
Class
Object #1Object #2
Object #3Object #n
23
STRATEGIES for FINDING OBJECTS (Classes)
Wirfs-Brock Noun Phrase
Conglomeration of others:
• Look for tangible things
• Consider roles played
• Identify incidents/interactions which are often
transaction-like
• Find any specifications (table-like)
• Other…
24
Wirfs-Brock Noun Phrase (also Wilkerson, Wiener)
• Circle or underline nouns and noun phrases
that occur in the requirements document(s);
these become candidate classes (objects)
• Put candidate classes on a separate list
• Challenge each one; look for synonyms
Examples:The system will keep track of membership informationThe system will manage inventoryThe system will facilitate the selling of bicycles
25
INFORMATION SYSTEMS OBJECTIVES
GENERAL OBJECTIVES:
A. Provide Just-in-Time (JIT) trainingB. The systems we implement must be friendly and easy to learn and useC. The systems we implement must give considerations to security issues
SPECIFIC OBJECTIVES:
1.1.1 Provide an automated system to assist with customer sales/rental check-outs
2.1.1 Provide and maintain an automated membership database a. provide current (up to date) membership information on demand b. capability to add, change, and delete (remove) membership info.
2.1.2 Provide membership information reports such as (not limited to): a. least used memberships b. most used memberships c. delinquent memberships (both money owing and outstanding rentals)
4.1.1 Provide and maintain an inventory database for both sales and rental items a. provide current (up to date) inventory information on demand b. capability to add, change, and delete (remove) inventory information (sales and rental)
4.1.2 Provide inventory information reports such as (not limited to): a. least popular rentals b. most popular rentals c. delinquent tape rentals outstanding d. products “on order” (purchasing report) for sale and for rent items
5.1.1 Provide Sales Reports such as (not limited to): a. sales for a time period (day, days, week, weeks, month, etc.) by product code b. rentals for a time period (same as above)
F i n d i n g
O b j e c t s
26
Security Issue
Automated System
Customer Sales/Rental Check-out
Membership Database
Membership Information
Membership Information Report
Inventory Database
Sales And Rental Item Inventory Information
Inventory Information Report
Sales Report
Candidate List of Classes
WIRFS-BROCK NOUN PHRASE STRATEGY
27
Look for tangible things• people, places, things
Consider roles played• student, faculty, clerk, manager, salesperson, race car driver,
etc...
Identify incidents/interactions which are often transaction-like• sales, purchases, reservations, etc...
Find any specifications (table-like)• state tables, tax rate tables, zipcode table, shipping region
table, etc...
OtherStrategies
ToFind
Objects
28
CHALLENGE CLASSES/OBJECTS BASED ON:
Needed remembrance (persistence)
No Attributes
No Operations
Only one Object
Avoid derived (computed) results
29
(CRC = Class-Responsibility-Collaboration)
4x6 Card
Class Name
Responsibilities(attributes andoperations)
Collaborations(relationships)
Order
orderNumberorderDatecheck if items in stockdetermine pricecheck for valid paymentdispatch to delivery addressetc...
Order LineOrder LineCustomer
etc...
BECK & CUNNINGHAM’s CRC STRATEGY(low-fidelity/tech way of documenting classes)
30
Candidate List of Classes - Pass One
• Members• Customers• Movies• Reports• Concessions• Sales• Games• Inventory• VCR Rentals• Movie Rental• Employees• Automated System• Hardware• Software• Back-up System
• Bonus Plan• P.O.S. Terminal• Clothing• Transaction• Marketing• Popcorn• Prices• Physical Environment• Scheduling• Location• Accounting• Advertising• Overhead• Database• Payroll
Video Store Information System
31
List of Classes – Final Pass
• RentalTransaction
• Member
• Employee
• StoreLocation
• Supplier
• Purchase Order
• Purchase Order Line Item
• SaleRentalLineItem
Note: * denotes an Abstract Class (no Objects)
• Inventory *
• Video
• Game
• ConcessionItem
• VCR
• Transaction *
• SaleTransaction
• SaleItem*
• RentalItem*
Video Store Information System
32
Video StoreClasses
showing Attributes - Part 1 of 3
Member memberNumbermemberNamememberAddressmemberCitymemberStatememberZipCodememberPhonecreditCardNumbercreditCardExpireDatedepositAmount
Video barCodeNumberdescriptionqtyOnOrderpricecosttaxCodetimesRenteddueDatememberNumberquantitySoldqtyOnHand
Class Attributes
33
Game (same as Video)
ConcessionItem barCodeNumberdescriptionqtyOnOrderpricecosttaxCodequantitySoldqtyOnHand
VCR barCodeNumberdescriptionqtyOnOrderpricecosttaxCodetimesRenteddueDatememberNumber
SalesTransaction transactionNumberemployeeNumbertransactionDatetransactionTimebarCodeNumberpricesalesTax
quantitySold
Class Attributes
Video StoreClasses
showing Attributes - Part 2 of 3
34
RentalTransaction transactionNumberemployeeNumbertransactionDatetransactionTimebarCodeNumberpricesalesTax
memberNumber
Employee employeeNumberemployeeNameemployeePhonepositionCode
StoreLocation storeNumberaddresscitystatezipcodetelephone
Vendor vendorNumbervendorNamevendorAddressvendorCityvendorStatevendorZipCodevendorPhonevendorFaxNumber
PurchaseOrder purchaseOrderNumber purchaseOrderDate purchaseOrderDueDatepurchaseOrderCancelDatebarCodeNumberquantityOrderedvendorNumberitemCost
Class Attributes
Video StoreClasses
showing Attributes -Part 3 of 3
35
Video Store Attribute Data Dictionary (partial)
Attribute Class Definition/Rules
barCodeNumber Inventory Up to 12 charactersTransaction Up to 12 characters
creditCardExpireDate Member MM/YY (month, year)
creditCardNumber Member Up to 19 characters
cost Inventory range: 0 to 999.99
depositAmount Member min: $25; max: $200
description Inventory 40 characters
employeeNumber Transaction 6 digits
memberAddress Member 30 characters (no P.O. Box)
memberCity Member 30 characters
memberName Member 30 characters
etc.....
36
Inventory
Video Store – UML Class Diagram
SaleItem RentalItem
Video Game ConcessionItem VCR
Transaction Employee StoreLocation
SaleTransaction RentalTransaction Suplier
Member PurchaseOrder
SaleRentalLineItemPurchaseOrderLineItem
1
0..*
0..* 0..1 10..*
1..*
1 1
1..*
10..*
1
0..*
11..*
10..*
0..*
1
37
Video Store Future Enhancements List - Final Pass
1. Open-ended memberships (indefinite; ie: no cancellations) with C.C. or $50 deposit (P)
2. Establish Bonus Point System for rentals (ie: rent 9 get one rental free, etc.) (E)
3. Handle special orders for videos (E)
4. Ability to reserve a movie ahead of time (E)
5. Automatic billing to credit card at end of month for month's charges (E)
6. Establish a membership DEBIT card (E)
7. Allow a monthly "tab" to be paid at the end of the month (see #5) (E)
8. No physical security devices on videos (P)
9. System will not include Payroll system, Accts. Payable, or Financial systems such as General Ledger and Income Statements (P)
10. The system will not keep information on non-member customer sales (P)
11. Game inventory can be for sale or rent (but only one of these at a time) (P)
12. The system will NOT include any work shift scheduling of employees (P)
13. The Video Store will rent VCRs
14. Payment for Rental transactions will be at time of transaction (not when item returned)
NOTE: (P) = Policy decision (E) = Potential Future Enhancement
38
QUITTING TIME