Search code examples
abstract-classimplementationumlclass-diagram

Class diagram usage in UML


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 ?


Solution

  • 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,

    enter image description here

    https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcRoONs8CzYit0VXZ9H7Au9MXgE8Fx0a2hsSOs8Kt3BLVWw_Il6U

    BankAccount is a high level abstraction. CheckAccount and SavingsAccount are lower level abstractions.

    as well as classes that make up an implementation

    enter image description here

    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.