简体   繁体   中英

modelling class diagrams

I have just started learning UML and after completing use case I've just started class diagram...

I was going through some examples and one among them was under operations category like this

issueBook(in bookName):Boolean

Now issuebook is an operation, but what's the deal with in and bookName

In this webpage it says do not model scaffolding code, but if we don't model in scaffolding code how we will know what operations we're going to write while coding?

Like in the given example scaffolding code, just ignore a few of the the operations?

Also, can anyone tell what are the steps to convert scaffolding code into non-scaffolding?

now "issuebook" is an operaton..but whats the deal with "in" and "bookname"

in means it's an input parameter - ie the value is read within the operation but not written. bookName is the name of the parameter.

re. Scaffolding code, it's just advice to prevent clutter in your model. For example, let's assume you have a class named BookStore with attributes address and turnover and operation issueBook() . That class without scaffolding would look something like this:

在此处输入图片说明

Whereas with scaffolding it would look something like this:

在此处输入图片说明

Point is the second diagram has visual clutter; the first is easier to read.

Whether you include the getters/setters depends on why you're drawing the diagram. If it's to understand the domain then the getters/setters aren't necessary. OTOH, if it's a specification for what needs to be coded then you can add them. All depends on purpose of the diagram.

hth.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM