Podcast
Questions and Answers
Within a UML Domain Class Notation, what convention is ALWAYS followed for class names?
Within a UML Domain Class Notation, what convention is ALWAYS followed for class names?
- Class names are written in lowercase.
- Class names are written in _italics_.
- Class names are always capitalized. (correct)
- Class names are written in camelback notation.
In domain modeling, what critical distinction defines a Domain Model Class Diagram?
In domain modeling, what critical distinction defines a Domain Model Class Diagram?
- It includes only software classes with attributes and associations.
- It includes both classes and interfaces from the user interface.
- It includes only classes from the problem domain, excluding any software classes or methods.
- It includes classes from the problem domain and software classes with methods. (correct)
How does the concept of an 'Association Class' enhance domain models?
How does the concept of an 'Association Class' enhance domain models?
- By storing additional information about the relationship itself, beyond just connecting objects.
- By replacing conventional classes with more dynamic, behavior-rich entities.
- By removing the need for direct relationships between entities, simplifying the diagram. (correct)
- By uniquely connecting objects directly, without the possibility of additional attributes.
In the context of multiplicity in UML diagrams, what does the notation '1..*' signify?
In the context of multiplicity in UML diagrams, what does the notation '1..*' signify?
When is it most appropriate to use an 'Association Class' in domain modeling?
When is it most appropriate to use an 'Association Class' in domain modeling?
In a domain model for a university's course enrollment system, how would you represent the grade a student receives in a course, considering that the grade is specific to the student's enrollment in that particular course section?
In a domain model for a university's course enrollment system, how would you represent the grade a student receives in a course, considering that the grade is specific to the student's enrollment in that particular course section?
In the context of generalization and specialization, what is a key characteristic of an 'abstract class'?
In the context of generalization and specialization, what is a key characteristic of an 'abstract class'?
What is the significance of 'camelback notation' in UML domain class diagrams?
What is the significance of 'camelback notation' in UML domain class diagrams?
Which statement accurately differentiates between 'Aggregation' and 'Composition' in the context of whole-part relationships?
Which statement accurately differentiates between 'Aggregation' and 'Composition' in the context of whole-part relationships?
How is inheritance visually represented in a UML class diagram?
How is inheritance visually represented in a UML class diagram?
Considering a scenario where a 'Customer' can place multiple 'Orders', and each 'Order' is placed by exactly one 'Customer', with each order containing 'OrderItems', how would you represent the multiplicity between 'Customer' and 'Order'?
Considering a scenario where a 'Customer' can place multiple 'Orders', and each 'Order' is placed by exactly one 'Customer', with each order containing 'OrderItems', how would you represent the multiplicity between 'Customer' and 'Order'?
In domain modeling, attributes are associated with classes. What does the notation custNumber {key} indicate about the custNumber
attribute?
In domain modeling, attributes are associated with classes. What does the notation custNumber {key} indicate about the custNumber
attribute?
Why are domain model classes not yet considered software classes?
Why are domain model classes not yet considered software classes?
In a UML diagram, when do we call a class 'concrete'?
In a UML diagram, when do we call a class 'concrete'?
What is the primary purpose of a domain model class diagram?
What is the primary purpose of a domain model class diagram?
How does the 'association class' concept address limitations of the use of standard associations within UML class diagrams?
How does the 'association class' concept address limitations of the use of standard associations within UML class diagrams?
What is the impact of modifying the multiplicity from '1' to '1..*' on the relationship between two entities in a domain model?
What is the impact of modifying the multiplicity from '1' to '1..*' on the relationship between two entities in a domain model?
When modeling a music library, a Song
can belong to many Playlist
s, and a Playlist
can contain many Song
s. If you want to store additional data relating to when a song was added to a specific playlist, what would be the most appropriate modeling choice?
When modeling a music library, a Song
can belong to many Playlist
s, and a Playlist
can contain many Song
s. If you want to store additional data relating to when a song was added to a specific playlist, what would be the most appropriate modeling choice?
In the context of generalization/specialization, consider a Vehicle
class with specialized subclasses like Car
and Truck
. If Vehicle
has an attribute numberOfWheels
, and Car
and Truck
inherit from Vehicle
, what design principle does this reflect?
In the context of generalization/specialization, consider a Vehicle
class with specialized subclasses like Car
and Truck
. If Vehicle
has an attribute numberOfWheels
, and Car
and Truck
inherit from Vehicle
, what design principle does this reflect?
You are modeling a system for a library. A Library
contains multiple Book
s. If the Library
is closed down, the Book
s can still exist and be transferred to other libraries. How would you model this relationship?
You are modeling a system for a library. A Library
contains multiple Book
s. If the Library
is closed down, the Book
s can still exist and be transferred to other libraries. How would you model this relationship?
Given a scenario of modeling Brain
and Person
. A Brain
is irrevocably a part of a Person
, and cannot exist independently. When the Person
ceases to exist, so does the Brain
. How can you create a UML diagram to represent this?
Given a scenario of modeling Brain
and Person
. A Brain
is irrevocably a part of a Person
, and cannot exist independently. When the Person
ceases to exist, so does the Brain
. How can you create a UML diagram to represent this?
For a domain model class diagram in a library management project, what are the key elements to model the relationship between a library branch and its books, considering actions, attributes and multiplicity?
For a domain model class diagram in a library management project, what are the key elements to model the relationship between a library branch and its books, considering actions, attributes and multiplicity?
In designing a domain model for an e-commerce system, you notice a need to capture various discounts applicable to different products. Some discounts are applicable to specific product categories, others to individual customers, and some are applicable to multiple cart items. What would be the method to represent this?
In designing a domain model for an e-commerce system, you notice a need to capture various discounts applicable to different products. Some discounts are applicable to specific product categories, others to individual customers, and some are applicable to multiple cart items. What would be the method to represent this?
When deciding whether what key to assign an association class, what would you not do?
When deciding whether what key to assign an association class, what would you not do?
In the context of whole-part relationships, consider a 'Car' and its 'Wheels'. A 'Car' could exist without having all of its 'Wheels' attached (e.g., during maintenance), and 'Wheels' can certainly exist independently of a specific 'Car' (being sold, stored, etc.). How would you best model this relationship?
In the context of whole-part relationships, consider a 'Car' and its 'Wheels'. A 'Car' could exist without having all of its 'Wheels' attached (e.g., during maintenance), and 'Wheels' can certainly exist independently of a specific 'Car' (being sold, stored, etc.). How would you best model this relationship?
When constructing a domain model, why is it important to use multiplicity notation to define relationships between classes?
When constructing a domain model, why is it important to use multiplicity notation to define relationships between classes?
In a domain model, what is the primary benefit of using generalization/specialization (inheritance)?
In a domain model, what is the primary benefit of using generalization/specialization (inheritance)?
In an e-commerce system, how would you best represent a customer's billing and shipping addresses, considering that a customer can have multiple addresses of each type?
In an e-commerce system, how would you best represent a customer's billing and shipping addresses, considering that a customer can have multiple addresses of each type?
You are designing a system for a university. In your domain model, how would you accurately model the scenario of needing more information for the relationship of a student to a particular course, such as enrollment date and grade? Students can also enroll in multiple courses, and courses can have multiple students.
You are designing a system for a university. In your domain model, how would you accurately model the scenario of needing more information for the relationship of a student to a particular course, such as enrollment date and grade? Students can also enroll in multiple courses, and courses can have multiple students.
What key consideration dictates the appropriate degree of granularity(how detailed) when creating a domain model?
What key consideration dictates the appropriate degree of granularity(how detailed) when creating a domain model?
Flashcards
What is a Class?
What is a Class?
A type of classification that describes a collection of objects.
What is a Domain Class?
What is a Domain Class?
Classes that describe objects specifically in the problem domain.
What is a Class Diagram?
What is a Class Diagram?
A UML diagram showing classes, attributes, and associations; may include methods.
What is a Domain Model Class Diagram?
What is a Domain Model Class Diagram?
Signup and view all the flashcards
How are class names formatted in UML?
How are class names formatted in UML?
Signup and view all the flashcards
How are attributes formatted in UML?
How are attributes formatted in UML?
Signup and view all the flashcards
What is Multiplicity?
What is Multiplicity?
Signup and view all the flashcards
What is an Association Class?
What is an Association Class?
Signup and view all the flashcards
What is a Superclass?
What is a Superclass?
Signup and view all the flashcards
What is a Subclass?
What is a Subclass?
Signup and view all the flashcards
What is inheritance?
What is inheritance?
Signup and view all the flashcards
What is an Abstract Class?
What is an Abstract Class?
Signup and view all the flashcards
What is Association?
What is Association?
Signup and view all the flashcards
What is Aggregation?
What is Aggregation?
Signup and view all the flashcards
What is Composition?
What is Composition?
Signup and view all the flashcards
Study Notes
Domain Modeling
- A class is a classification to describe a objects
- A domain class refers to classes that describe objects in the domain
- A class diagram is a UML diagram displaying classes with attributes and associations
- If it models software classes, a class diagram includes methods
- Domain model class diagrams include classes from the problem domain, not software
UML Domain Class Notation
- Domain class notation includes a name and attributes
- Class names are capitalized
- Attribute names are not capitalized
- Camelback notation is used for attribute names (words run together and the second word is capitalized)
- Camelback notation is used for compound class names
Multiplicity in UML
- UML notation expresses how many instances of one class relate to instances of another
Domain Model Class Diagram example
- The example refers to a bank with many branches
- The diagram includes notation for the key, attributes (precise via camelback), and multiplicity
Domain Model Class Diagram for Course Enrollment
- University course enrollment includes CourseSections for a Course
- A CourseSection has Students
- A Student is registered in many CourseSections
- Problem: How/where to capture student grades?
Association Class
- An Association Class represents a relationship between two or more classes
- It has its own attributes and behaviors
- It stores additional information beyond connecting objects
- A "Student" and "Course" relationship might use an Association Class like "Enrollment"
- The "Enrollment" class might capture "enrollment date" or "grade" specifics
Refined Course Enrollment Model
- Association classes are treated as a class in a many-to-many association
- Attributes need to be remembered, such as grades
Association Class Details
- The association class is the same "thing" as the association itself
- The unique identifier (key) for the association class is the concatenation of the keys of the attached classes
- In the example, the key for CourseSection is CourseNumber+SectionNumber
- Therefore, the key for CourseEnrollment is CourseNumber+SectionNumber+StudentID
- If more information is required to uniquely identify instances, the model is incorrect
- If the key can't be formed by concatenating endpoint keys, it's an error
Hospital Registration System
- Each ward has many medical histories and each medical history is associated with a patient
- Each patient has many visits, each visit is associated with a ward
- The location of each patient's medical history isn't specified
Admission System with Association Class
- Improves upon tracking patient history using association classes
Modeling Bands, Members, and Concerts
- Considers relationships between bands, the members within them, and their shows
- Considers how many bands a person can play in
- Considers how many concerts a band can play
- Considers how many bands play a show
- Examines attributes used for keys, and if "key" attributes need to be added
Concert Booking Information
- The association class (Booking) also provides a name and meaning for the association
- The key for the Booking class must uniquely identify instances
Generalization/Specialization
- Superclass: The superior or more general class in a generalization/specialization hierarchy.
- Subclass: The subordinate or more specialized class in a generalization/specialization hierarchy.
- Inheritance: Subclasses inheriting the characteristics of the more general superclass.
Generalization/Specialization for RMO Sales
- An Abstract class cannot be instantiated, and serves as a blueprint for subclasses
- Classnames are in Italics (Sale)
- Inheritance is represented using a triangle notation
- InStoreSale, OnlineSale, and TelephoneSale extend the abstract Sale class
- InStoreSale, OnlineSale, and TelephoneSale are concrete subclasses
Inheritance for Bank Accounts
- SavingsAccount has 4 attributes
- CheckingAccount has 5 attributes
- Subclasses inherit the associations
Complex Class Relationships: Whole-Part
- Association (General Relationship)
- A simple line connects two classes
- Represents an interaction between classes without necessary dependence
- Example: A Teacher teaches a Student
- Aggregation (Weak "Has-a" Relationship)
- A hollow diamond is near the patient class
- Depicts a whole-part relationship where the child (part) can exist independently of the parent
- Example: A Library contains multiple Books, but a Book can still exist outside of the Library
- Composition (Strong "Has-a" Relationship)
- A filled diamond is near the parent class
- Depicts a whole-part relationship where the child cannot exist without the parent,.
- Example: A House has Rooms, if the House is destroyed, the Rooms also cease to exist
Parts of a Computer
- This is aggregation, with the diamond symbol
- Whole parts can have multiplicity symbols
Whole-Part Relationships: Composition
- Composition example: Person is composed of a Brain, Heart, and Legs
Aggregation vs Composition
- Composition and aggregation are two subsets of association
- The object of one class is owned by the object of another class in both cases
- In composition, the child is dependent on it's parent but aggregation the the child is independent
- Aggregation is a speical form of association
- Composition is the special form of aggregation
RMO CSMS Project Domain
- Domain model class diagrams can be created in several ways for a project
- RMO CSMS has 27 domain classes overall
- One diagram per subsystem can be created for those working on the subsystem
- An overall diagram can be created to provide an overview
- A draft is usually completed early, kept up to date, and used to guide development
Summary of Domain Modeling
- UML class diagram notation is used to create a domain model class diagram
- Domain model classes don't have methods because they aren't yet software classes
- Three UML class diagram relationship types exits: association, generalization/specialization, and whole-part
- Class diagram concepts are abstract, concrete verses compound attributes, composition/aggregation association classes, and super/subclasses
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.
Related Documents
Description
Understand domain modeling and UML class diagrams. Learn about domain class notation and multiplicity in UML. Review an example of a domain model class diagram for a bank with branches, including keys and attributes.