An attribute is a UML Class Diagram specific representation of a piece of data such as a number.

They are usually written something like:

  • age: int
  • name: String

Example

class Coordinates {
+ x: int
+ y: int
}

A Coordinates Class representing a set of 2D Cartesian coordinates.

This is an example of a Class with attributes only.