Download presentation
Presentation is loading. Please wait.
Published byMelina Brooks Modified over 9 years ago
1
OOD - Principles Design Class Diagrams Chapter 10 pp. 295-298; 304-314; 317-320 1
2
Where are we? 2 Design Chapters Ch 7Designing User & System Interfaces Ch 10OO Design – Principles Ch 11OO Design – Use Case Realizations Ch 12Databases, Controls & Security
3
OOD: Object-Oriented Design From "Domain Classes" to "Programming Classes" Specify objects to carry out each use case 3
4
From Requirements (Analysis) to Design… 4 Ch10 Ch11
5
Defining a Single Design Class 5
6
Domain Class vs. Design Class 6
7
Design Class: Things to Know Elaborate attributes Define Method types Write Method Signatures Identify Instance-Level and Class-Level Attributes & Methods 7
8
Elaborating Attributes visibility attributeName: dataType {property} Visibility Public or Private Data type Numbers: integer, double Text: string True/False: boolean Dates: dateTime Property key 8
9
Method Types 3 Method types Constructor methods Accessor methods − Get − Set Processing methods 9 9:05 & 10:1 0
10
Method Signatures visibility methodName(parameterList) : returnType Visibility Public or Private Method name Verb phrase Parameter List Inputs Return Type Output Typical data type: integer, string, etc Object (e.g. Student) Collection of objects: StudentArray 10
11
Instance-Level vs. Class-Level Attributes & Methods Instance-Level − Pertains to an individual object/instance − Attribute name − Method getName(), calcGPA() Class-Level − Does not pertain to an individual object/instance − Attribute tuitionPerHour − Method findAboveHours() 11 -tuitionPerHour: integer
12
Exercise Design a Design Class for: Vehicle Attributes − Primary Key − Instance attribute − Class Attribute Method − Constructor method − Instance Method Accessor methods (2) Processing method − Class Method 12 905 & 1010
13
A Design Class (coded in VB) 13
14
14 Design Class Diagram Overridden Method How many attributes are there in a MailOrder object?
15
Designing a Domain Class Diagram 15
16
Review – let’s understand this Use Case before continuing Use Case Description “Process New Order” 16
17
Review – let’s understand this model before continuing Domain Class Diagram 17
18
Steps: Initial Design Class Diagram 1. Select a Use Case: “Process New Order” 2. Add Domain Classes See pre-conditions & post-conditions for ideas 3. Elaborate Attributes: visibility, data types 18
19
Steps: Initial Design Class Diagram 4. Add a "Controller" class − Switchboard between the View & Domain Layer; a collection point for incoming messages. Include one per use case. 19
20
Steps: Initial Design Class Diagram 5. Add Navigation Visibility (def) the ability of one object to interact with another 20 1 to Many Association 1 * Mandatory Associations Indep Dependent Needs info Sender Receiver Rules
21
Steps: Initial Design Class Diagram 6. Add Methods (we will see this in Ch 11 via Sequence Diagrams) That is, Behavior! 21
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.