Abstract attributes

Hello,

I have a question regarding the convention for representing abstract attributes in abstract classes and interfaces (in class diagrams).

In the tutorial sheets, the abstract classes all seem to declare regular attributes, but these attributes do not appear to be initialized, hence, the confusion on if these are abstract or not. Hence, I ask what exactly is the convention when it comes to declaring abstract attributes in the class diagrams.

Thanks!

Hello,

It is perfectly fine to put <<abstract>> above the class name to indicate that the class is abstract. You do not need to explicitly indicate in any way that an attribute is abstract.

Best regards,
Mohammed

3 Likes