lutaml / lutaml-uml

UML module for LutaML
2 stars 2 forks source link

UML syntax: Classifier #19

Open ronaldtse opened 4 years ago

ronaldtse commented 4 years ago

Classifier

Screen Shot 2020-08-05 at 12 59 08 AM

Classifier-Notation and Semantics

Screen Shot 2020-08-05 at 12 59 26 AM

Classifier-Notation and Semantics

Screen Shot 2020-08-05 at 12 59 43 AM

Proposal:

  1. An abstract class called GeomFigure

class abstract GeomFigure {}

or

class GeomFigure { abstract }

class Circle {} class Rectangle {}

GeomFigure <|- Circle GeomFigure <|- Rectangle


2. A class with compartments for name, attributes and operations

class Circle { +radius: int {radius > 0}

show() enlarge() }

w00lf commented 4 years ago

In ucd we already have abstract class notation, lets stick with it:

abstract class GeomFigure {}
class Circle {}
class Rectangle {}

GeomFigure <|- Circle
GeomFigure <|- Rectangle
ronaldtse commented 4 years ago

In ucd we already have abstract class notation, lets stick with it:

OK.

I would like to make the context separator {} optional if the class doesn't have anything to define too.