A UML class diagram is a way to represent the compile-time relationships between various classes. A class diagram consists of: