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?
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?
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?
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?
Signup and view all the answers
What does a design class diagram stereotype indicate?
What does a design class diagram stereotype indicate?
Signup and view all the answers
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?
Signup and view all the answers
Which of the following is true about abstract classes?
Which of the following is true about abstract classes?
Signup and view all the answers
Which type of operation does a class level method pertain to?
Which type of operation does a class level method pertain to?
Signup and view all the answers
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?
Signup and view all the answers
Which method signature denotes a method that will return an integer?
Which method signature denotes a method that will return an integer?
Signup and view all the answers
What does the principle of encapsulation specifically help to reduce?
What does the principle of encapsulation specifically help to reduce?
Signup and view all the answers
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?
Signup and view all the answers
What is considered an indicator of high cohesion within a class?
What is considered an indicator of high cohesion within a class?
Signup and view all the answers
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?
Signup and view all the answers
Which principle advocates for grouping similar functionalities into classes?
Which principle advocates for grouping similar functionalities into classes?
Signup and view all the answers
What is the primary benefit of inheritance in object-oriented design?
What is the primary benefit of inheritance in object-oriented design?
Signup and view all the answers
Why is it preferable to have classes that are loosely coupled?
Why is it preferable to have classes that are loosely coupled?
Signup and view all the answers
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?
Signup and view all the answers
What is the primary assumption that underlies object responsibility in design?
What is the primary assumption that underlies object responsibility in design?
Signup and view all the answers
What does high cohesiveness indicate about a class's responsibilities?
What does high cohesiveness indicate about a class's responsibilities?
Signup and view all the answers
What is the primary role of a subclass in object-oriented design?
What is the primary role of a subclass in object-oriented design?
Signup and view all the answers
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?
Signup and view all the answers
What is the significance of indirection in class design?
What is the significance of indirection in class design?
Signup and view all the answers
What does the dashed line in a sequence diagram represent?
What does the dashed line in a sequence diagram represent?
Signup and view all the answers
How does a base controller function in an object-oriented design?
How does a base controller function in an object-oriented design?
Signup and view all the answers
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?
Signup and view all the answers
What do activation lifelines in a sequence diagram indicate?
What do activation lifelines in a sequence diagram indicate?
Signup and view all the answers
What assumption is made regarding technology in object-oriented design?
What assumption is made regarding technology in object-oriented design?
Signup and view all the answers
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?
Signup and view all the answers
Which is a characteristic of a controller class in object-oriented design?
Which is a characteristic of a controller class in object-oriented design?
Signup and view all the answers
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.