Podcast
Questions and Answers
What is the primary role of a controller class in object-oriented design?
What is the primary role of a controller class in object-oriented design?
Which of the following statements is true regarding persistent classes?
Which of the following statements is true regarding persistent classes?
In the context of method signatures, what does the visibility symbol '+' indicate?
In the context of method signatures, what does the visibility symbol '+' indicate?
What does the notation '-accountNo: String {key}' signify in a class diagram?
What does the notation '-accountNo: String {key}' signify in a class diagram?
Signup and view all the answers
What are boundary classes primarily designed to represent?
What are boundary classes primarily designed to represent?
Signup and view all the answers
What is a defining character of abstract classes in object-oriented design?
What is a defining character of abstract classes in object-oriented design?
Signup and view all the answers
'-check Validity(date): int' is an example of what type of method?
'-check Validity(date): int' is an example of what type of method?
Signup and view all the answers
What does the notation '<<Boundary>>' represent in a design class diagram?
What does the notation '<<Boundary>>' represent in a design class diagram?
Signup and view all the answers
What is the significance of using lower case camelback notation for attribute names?
What is the significance of using lower case camelback notation for attribute names?
Signup and view all the answers
Which of the following best describes a data access class?
Which of the following best describes a data access class?
Signup and view all the answers
Study Notes
Object-Oriented Design Steps
- Object-oriented design identifies classes, methods, and messages needed for a use case.
- Design is carried out for each use case individually.
Design Class Diagrams
- Stereotype: Categorizes model elements by characteristics (e.g., <<>>).
- Persistent Class: Objects persist after system shutdown (data remembered).
- Entity Class: Identifies domain problem classes (usually persistent).
- Boundary Class/View Class: Exists on system boundaries (e.g., input windows, web pages).
- Controller Class: Mediates between boundary and entity classes, acting as a switchboard between view and domain layers.
- Data Access Class: Retrieves and sends data to/from database.
Notation for Design Class Syntax
-
Attributes:
- Visibility: Indicates access (+ public, - private).
- Name: Lower camel case (e.g., attributeName).
- Type: Data type (e.g., string, integer, date).
- Initial Value (if applicable): Default value.
- Property (if applicable): Indicates a key (e.g., {key}).
-
Methods:
- Visibility: Indicates access (+ public, - private).
- Name: Lower camel case (e.g., methodName).
- Parameters: Variables passed to a method.
- Return Type: Data type returned by the method.
-
Examples:
-
accountNo: String {key}
-
startingJobCode: integer = 01
-
+getName(): string
-
-checkValidity(date): int
-
-
Class Level Methods (Static Methods): Methods that apply to the class itself, not individual objects, underlined (e.g.,
_findStudentsAboveHours(hours): Array
). -
Class Level Attributes (Static Attributes): Attributes belonging to the class, not individual objects, underlined (e.g.,
_noOfPhoneSales: int
). -
Abstract Classes: Cannot be instantiated; used for inheritance (italicized).
-
Concrete Classes: Can be instantiated.
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.
Related Documents
Description
Test your knowledge on the essential steps of object-oriented design, including the identification of classes, methods, and messages for various use cases. This quiz also covers the various class types and syntax used in design class diagrams.