Reputation: 1470
As I read through
" Unified Modeling Language User Guide, Grady Booch ,James Rumbaugh ,Ivar Jacobson Publisher: Addison Wesley First Edition October 20, 1998 "
that :
You use classes to capture the vocabulary of the system you are developing. These classes may include abstractions that are part of the problem domain, as well as classes that make up an implementation
Could you please clarify the quoted sentences through simple example in UML and please focus on two bold sentences ?
Upvotes: 3
Views: 12323
Reputation: 1967
Class diagrams can be used for Domain Model: Conceptual Classes
In Object Oriented analysis, we can create domain models
A domain model is the visual representation of real situation objects in the domain-problem space.
Why Create Domain Model?
To understand key concepts and the vocabulary of domain-problem space.
And
While we are developing software classes ,Domain classes give us inspiration.
For example here is a partial domain model for a Monopoly Game.
In this diagram "Die" is a real world "Die". And our aim is to understand "Monopoly" game.
Class diagramas can be used for Implementation : Software Classes
They are classes which we (will) implement in a programming language.They represent software abstractions. They are inspired from domain model but there is no one to one mapping between them.
Here is a sample partial simple Software Class diagram for Monopoly Game
Even you can use UML class diagram just explaining some concepts in any domain [ not related to any software development activity]
Upvotes: 1
Reputation: 715
You use classes to capture the vocabulary of the system you are developing.
This means you should turn the concepts you found in your requirements understanding into your "domain entities" and let them be represented into the class diagram.
These classes may include abstractions that are part of the problem domain,
BankAccount is a high level abstraction. CheckAccount and SavingsAccount are lower level abstractions.
as well as classes that make up an implementation
http://www.bitstorm.org/gameoflife/code/gameoflife-uml.png
In this other example you see an implementation diagram, which already involves technology with your design and implementation decisions.
Upvotes: 3