In: Computer Science
Draw a class diagram for your monopoly. You can use any visual tools to draw the diagram and you need to utilize different relationships between classes, define the attributes and operations of classes.
Nothing too complex please. Just the basics.
Class diagrams:
Class diagrams are the main building blocks in object-oriented modeling. They use various objects in the system, is used for their characteristics, showing their operations and the relationships between them.
Relationships in Class Diagrams:
Classes are connected to each other in specific ways. In particular, relationships in class diagrams include various types of logical connections.
Association: It is a broad term that describes a logical relationship or relationship between classes.
Directed Association: It refers to a directional relationship represented by a line with an arrow.
Reflexive Association: This occurs when a class may have multiple functions or responsibilities. If a maintenance crew member is managed by an aviation engineer, two instances of the same class can be managed by the relationship.
Multiplicity: Active logical associations when the cardinality of a class is being depicted in relation to each other.
Aggregation: It refers to the formation of a particular class as a result of a class being constructed as an aggregation or collection.
Composition: The composition relationship is similar to the aggregation relationship. Namely, will be destroyed by the square lies in the destruction of the container class.
Attributes: An Attribute is a named property of a class. It describes the range of values that that property may hold.
Operations of classes: The operations most clearly correspond to the methods of a class. At the specification level, operations correspond to public methods on a type. Generally, you do not show functions that only manipulate attributes, as they can usually be inferred.