Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UML syntax: Typed elements #14

Closed
ronaldtse opened this issue Aug 3, 2020 · 5 comments
Closed

UML syntax: Typed elements #14

ronaldtse opened this issue Aug 3, 2020 · 5 comments
Labels
enhancement New feature or request

Comments

@ronaldtse
Copy link
Contributor

Typed elements

  • A typed element is a named element that can have a type.
    • Ex.- Attributes and parameteres.
  • A type specifies a set of values for a typed element.
    • Ex.- Simple data types and classes are types.

Screen Shot 2020-08-03 at 9 54 40 PM

Proposal:

class Booking {
  +booker: customer
}

# class MyClass {
#   +TypedElement: Type
# }
@ronaldtse ronaldtse added the enhancement New feature or request label Aug 3, 2020
@w00lf
Copy link
Contributor

w00lf commented Aug 4, 2020

@ronaldtse looks good, but i would also add attribute notation:

class Booking {
  + attribute booker: customer
}

@ronaldtse
Copy link
Contributor Author

As per #10 I think we need to allow a shorthand. The keyword "attribute" is fine, but allowing a shorthand of omitting it would be good.

@w00lf
Copy link
Contributor

w00lf commented Aug 5, 2020

As per #10 I think we need to allow a shorthand. The keyword "attribute" is fine, but allowing a shorthand of omitting it would be good.

Can you please explain the difference between typed element and derived attribute?

@ronaldtse
Copy link
Contributor Author

"Typed element" is an attribute that accepts only a certain "Type".
Screen Shot 2020-08-06 at 5 39 20 PM

Derived attribute is an attribute that has a value produced/assigned from another place:
https://www.uml-diagrams.org/derived-property.html
Screen Shot 2020-08-06 at 5 41 14 PM

They are prefixed with slash /myattribute. The following example is clear.

Screen Shot 2020-08-06 at 5 41 46 PM

@w00lf
Copy link
Contributor

w00lf commented Oct 4, 2020

Implemented in repo

@w00lf w00lf closed this as completed Oct 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants