03 - Domain Modeling Flashcards

1
Q

What is domain modeling in software engineering?

A

Domain modeling is the process of capturing the most important classes and their associations in a software system.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How do you capture data requirements in domain modeling?

A

Data requirements are captured using a class diagram, which represents the classes and associations in the software system.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are the potential classes in a class diagram?

A

Potential classes in a class diagram are derived from the nouns and noun phrases extracted from the prompt statement or user requirements

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How do you identify associations in a class diagram?

A

Associations in a class diagram are derived from the verbs and verb phrases extracted from the prompt statement or user requirements.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What should you consider when decomposing user requirements into classes and associations?

A

The decomposition of user requirements depends on judgment, experience, and the nature of the problem. There is usually no single correct model, and design choices are based on individual judgment and experience.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are attributes in a class diagram?

A

Attributes are properties or characteristics of classes and are usually expressed as nouns followed by possessive phrases.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How do you identify attributes in a class diagram?

A

Attributes can be obtained from the prompt statement or user requirements, but some may require consultation with domain experts

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How do you handle irrelevant classes in domain modeling?

A
  • Irrelevant classes can be ignored by applying certain rules:
    • Eliminate classes that are irrelevant to the domain model.
    • Ignore vague classes and make them more specific.
    • Keep the most descriptive class if there are redundant classes.
    • Convert classes that describe a row into association names instead of classes.
    • Eliminate classes that represent operations, actions, or functionality.
    • Exclude classes that describe implementation constructs.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Is there a single correct decomposition of user requirements in domain modeling?

A

No, there is usually no one correct decomposition. Design choices are subjective and based on judgment and experience.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is the importance of domain modeling in software engineering?

A

Domain modeling helps in understanding the structure and relationships of classes in a software system, which is crucial for effective software design and development.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What should be done if some associations in a class diagram are irrelevant to the domain model?

A

Irrelevant associations that do not contribute to the understanding of the domain model should be eliminated to keep the diagram clean and focused.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What should be done if some associations represent operations rather than relationships?

A

Associations that represent operations (e.g., actions or processes rather than static relationships between entities) should also be removed from the class diagram.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Why is it generally advised to avoid ternary associations in a class diagram?

A

Ternary associations (associations involving three entities) can make diagrams more complex and harder to read. It is often better to decompose them into multiple binary associations to simplify the diagram.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

When is it acceptable to remove a derived association?

A

Derived associations, where the relationship between two entities can be inferred from other associations, can be removed if they provide redundant information. For example, if you can reach from entity A to B through an indirect path (A to C to B) and directly (A to B), you might remove one path if it doesn’t add additional value.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

How should redundant paths in a class diagram be managed?

A

Redundant paths should be carefully evaluated. In cases where paths provide different meanings or roles (e.g., indicating different aspects of transactions or relationships), both paths might be necessary to retain meaningful information.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What example illustrates the need to retain redundant paths?

A

The example provided involves transactions where two associations (isAgainst and holds) are present along with a makes association. Removing one path might cause loss of information about transaction initiation or account involvement, thus both associations are needed.

17
Q

What should be done if attributes in a class diagram are not related to the class or object they are associated with?

A

Attributes that are not closely related to the class or object should be removed. The class should be simple and coherent, with attributes directly relevant to its role

18
Q

How should attributes that are actually classes or should be in an association class be handled?

A

Attributes that are better represented as classes should be transformed into classes. Similarly, attributes that pertain to relationships between classes should be moved to an association class, which holds attributes relevant to the association.

19
Q

What details must be specified for each class in a class diagram?

A

For each class, you must specify all attributes, including their names, types, and multiplicities.

20
Q

What should be provided for each association in a class diagram?

A

For each association, you should provide a name, and if it is a unary association, you should also include role names and multiplicities. If necessary, include an association class to detail attributes related to the association.