Overview of Class Diagram Elements
We're going to start off this section on the class diagrams with a review. You may be curious on why we're returning to this topic class diagram. We've walked through it a few times.
Guide Tasks
  • Read Tutorial
  • Watch Guide Video
Video locked
This video is viewable to users with a Bottega Bootcamp license

I wanted to design this course so in the future you would have a quick reference.

A Class diagram has three elements.

  • Name
  • Attributes
  • Operations

The name is the most self-explanatory piece, we have a topic which is the name for this class diagram. In a real-world scenario, you wouldn't add these specific types of notes like class name because it's self-explanatory.

Attributes have three different items at a minimum that you should include.

  • Visibility (public/protected/private can be denoted with a plus/hash/minus)
  • Name
  • Data Type

Operations are methods/functions. Add a plus if you want to call from outside of the topic or a minus if you do not want to call outside the topic. Also, operations are always followed by parentheses.