In the next video, you will learn about a few of the best practices that you should follow while drawing a class diagram.
Some of the best practices while working on Class Diagrams in UML are:
Finally, let's see what are the best practices to be followed while drawing a class diagram as part of the requirements, all the nouns that you identify should ideally be a class, and all the actions or the verbs that the noun does should be the methods of the class. When you get started, don't constrain yourself to a limited number of classes. Try to draw as many classes as possible corresponding to each noun that you can derive with. We can think about optimization later.
A class name is very important to denote what it does. The naming convention is very fundamental so that it is clearly representing what it is expected to do. Lastly, if something is not important, then it not necessarily need to be a class, but it can be an attribute. For example, many of those attributes are just. It tells more about a class, but they are not a class in itself. We need to see how important it is and then make a decision whether it's a class in itself or it's just a property of a class.
Best practices for drawing a class diagram as part of requirements are important to follow.
All nouns identified should be classes, and verbs should be the methods of the class.
Don't constrain yourself to a limited number of classes and try to draw as many classes as possible.
Naming convention for class names is important to denote its function clearly.
Not all attributes need to be classes and can be a property of a class.
Importance of an attribute should be evaluated to decide if it's a class or a property.