Podcast
Questions and Answers
What term describes a class whose objects retain their existence after the system has been shut down?
What term describes a class whose objects retain their existence after the system has been shut down?
- Transient class
- Controller class
- Boundary class
- Entity class (correct)
Which class type serves as a mediator between boundary classes and entity classes?
Which class type serves as a mediator between boundary classes and entity classes?
- Persistent class
- Controller class (correct)
- Data access class
- View class
What is the visibility indication for an attribute that can be accessed by other objects?
What is the visibility indication for an attribute that can be accessed by other objects?
- -
- #
- *
- + (correct)
Which notation is used to indicate that a method cannot be invoked outside its own class?
Which notation is used to indicate that a method cannot be invoked outside its own class?
What does a design class diagram stereotype indicate?
What does a design class diagram stereotype indicate?
What notation is specifically used for attributes that only apply to the class and not its instances?
What notation is specifically used for attributes that only apply to the class and not its instances?
Which of the following is true about abstract classes?
Which of the following is true about abstract classes?
Which type of operation does a class level method pertain to?
Which type of operation does a class level method pertain to?
What is the appropriate notation for the initial value of an attribute in a class?
What is the appropriate notation for the initial value of an attribute in a class?
Which method signature denotes a method that will return an integer?
Which method signature denotes a method that will return an integer?
What does the principle of encapsulation specifically help to reduce?
What does the principle of encapsulation specifically help to reduce?
Which design principle focuses on protecting stable parts of a system from those likely to change?
Which design principle focuses on protecting stable parts of a system from those likely to change?
What is considered an indicator of high cohesion within a class?
What is considered an indicator of high cohesion within a class?
Which term describes the quantitative measure of how closely related classes are linked?
Which term describes the quantitative measure of how closely related classes are linked?
Which principle advocates for grouping similar functionalities into classes?
Which principle advocates for grouping similar functionalities into classes?
What is the primary benefit of inheritance in object-oriented design?
What is the primary benefit of inheritance in object-oriented design?
Why is it preferable to have classes that are loosely coupled?
Why is it preferable to have classes that are loosely coupled?
Which of the following is NOT a consequence of low cohesion in a class?
Which of the following is NOT a consequence of low cohesion in a class?
What is the primary assumption that underlies object responsibility in design?
What is the primary assumption that underlies object responsibility in design?
What does high cohesiveness indicate about a class's responsibilities?
What does high cohesiveness indicate about a class's responsibilities?
What is the primary role of a subclass in object-oriented design?
What is the primary role of a subclass in object-oriented design?
Which concept allows different methods of the same name to coexist in a class?
Which concept allows different methods of the same name to coexist in a class?
What is the significance of indirection in class design?
What is the significance of indirection in class design?
What does the dashed line in a sequence diagram represent?
What does the dashed line in a sequence diagram represent?
How does a base controller function in an object-oriented design?
How does a base controller function in an object-oriented design?
When creating a design class diagram (DCD), which step follows extending input messages?
When creating a design class diagram (DCD), which step follows extending input messages?
What do activation lifelines in a sequence diagram indicate?
What do activation lifelines in a sequence diagram indicate?
What assumption is made regarding technology in object-oriented design?
What assumption is made regarding technology in object-oriented design?
What is expected when determining the objects involved in a message during design?
What is expected when determining the objects involved in a message during design?
Which is a characteristic of a controller class in object-oriented design?
Which is a characteristic of a controller class in object-oriented design?
Flashcards
Object-Oriented Design
Object-Oriented Design
Identifying classes, methods, and messages for a use case.
Use Case Driven Design
Use Case Driven Design
Designing by focusing on individual use cases.
Persistent Class
Persistent Class
A class whose objects survive program termination.
Entity Class
Entity Class
Signup and view all the flashcards
Boundary Class
Boundary Class
Signup and view all the flashcards
Controller Class
Controller Class
Signup and view all the flashcards
Data Access Class
Data Access Class
Signup and view all the flashcards
Attribute Visibility
Attribute Visibility
Signup and view all the flashcards
Method Visibility
Method Visibility
Signup and view all the flashcards
Class Level Method
Class Level Method
Signup and view all the flashcards
Indirection
Indirection
Signup and view all the flashcards
Polymorphism
Polymorphism
Signup and view all the flashcards
Use Base Controller
Use Base Controller
Signup and view all the flashcards
Lifeline
Lifeline
Signup and view all the flashcards
Activation Lifeline
Activation Lifeline
Signup and view all the flashcards
What are the origins and destinations of messages?
What are the origins and destinations of messages?
Signup and view all the flashcards
DCD Input Models
DCD Input Models
Signup and view all the flashcards
Extend Input Messages
Extend Input Messages
Signup and view all the flashcards
Assumptions in OOD
Assumptions in OOD
Signup and view all the flashcards
From Input Messages
From Input Messages
Signup and view all the flashcards
Object Responsibility
Object Responsibility
Signup and view all the flashcards
Separation of Responsibility
Separation of Responsibility
Signup and view all the flashcards
Protection from Variations
Protection from Variations
Signup and view all the flashcards
Coupling (Tight/Loose)
Coupling (Tight/Loose)
Signup and view all the flashcards
Cohesion (High/Low)
Cohesion (High/Low)
Signup and view all the flashcards
Encapsulation
Encapsulation
Signup and view all the flashcards
Inheritance
Inheritance
Signup and view all the flashcards
What is the benefit of loose coupling?
What is the benefit of loose coupling?
Signup and view all the flashcards
How does high cohesion benefit a class?
How does high cohesion benefit a class?
Signup and view all the flashcards
Why is encapsulation important?
Why is encapsulation important?
Signup and view all the flashcards
Study Notes
Steps of Object-Oriented Design
- Object-oriented design identifies the classes, their methods, and messages for a use case.
- Design is use-case driven.
Design Class Diagrams
- Stereotype: categorizes model elements by characteristics (e.g., <<>>).
- Persistent class: object exists after system shutdown (data remembered).
- Entity class: identifies a problem domain class (usually persistent).
- Boundary class/view class: exists at system boundary (e.g., input window, webpage).
- Controller class: mediates between boundary and entity classes, acting as a switchboard.
- Data access class: retrieves and sends data to/from a database.
Notation for a Design Class
Syntax for Name, Attributes, and Methods
Attributes
- Visibility: indicates access (+ public, - private).
- Attribute name: lower camel case (e.g., accountNo).
- Type expression: class, string, integer, etc.
- Initial value (if applicable); e.g.,
accountNo: String {key}
. - Property (if applicable), e.g., {key}.
Method Signature
-
Visibility: indicates access (+ public, - private).
-
Method name: lower camel case (verb-noun), e.g.,
getName()
. -
Parameters: variables passed to a method.
-
Return type: the data type returned by the method, e.g.,
getName(): string
. -
Class-level method: applies to the class, not objects (static method).
-
Class-level attribute: applies to the class, not objects (static attribute); underlined (e.g.,
-noOfPhoneSales: int
). -
Abstract class; Italicized, cannot be instantiated, only used for inheritance.
-
Concrete class: can be instantiated.
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.
Related Documents
Description
Explore the essential steps and components of object-oriented design through this quiz. Understand the classification of design elements, including classes, methods, and their interactions. Test your knowledge on design class diagrams and the notation for defining attributes and methods.