Since it is valuable to identify conceptual super and subclasses, it is useful to clearly and precisely understand generalization, superclasses, and subclasses in terms of class definition and class sets. This following sections explore these.
Generalization and Conceptual Class Definition
What is the relationship of a conceptual superclass to a subclass?
Definition : A conceptual superclass definition is more general or encompassing than a subclass definition.
For example, consider the superclass Paymentand its subclasses (CashPayment, and so on). Assume the definition of Payment is that it represents the transaction of transferring money (not necessarily cash) for a purchase from one party to another, and that all payments have an amount of money transferred. The model corresponding to this is shown in Figure.
Figure 31.3 Payment class hierarchy
A CreditPayment is a transfer of money via a credit institution which needs to be authorized. My definition of Payment encompasses and is more general than my definition of CreditPayment.
Generalization and Class Sets
Conceptual subclasses and superclasses are related in terms of set membership.
Definition : All members of a conceptual subclass set are members of their superclass set.
For example, in terms of set membership, all instances of the set CreditPayment are also members of the set Payment. In a Venn diagram, this is shown as in Figure.
Figure 31.4 Venn diagram of set relationships
Conceptual Subclass Definition Conformance
When a class hierarchy is created, statements about superclasses that apply to subclasses are made. For example, Figure states that all Payments have an amount and are associated with a Sale.
Figure 31.5 Subclass conformance
All Payment subclasses must conform to having an amount and paying for a Sale. In general, this rule of conformance to a superclass definition is the 100% Rule:
Guideline: 100% Rule
100% of the conceptual superclass's definition should be applicable to the subclass. The subclass must conform to 100% of the superclass's:
Conceptual Subclass Set Conformance
A conceptual subclass should be a member of the set of the superclass. Thus, CreditPayment should be a member of the set of Payments.
Informally, this expresses the notion that the conceptual subclass is a kind of superclass. CreditPayment is a kind of Payment. More tersely, is - a - kind - of is called is - a.
This kind of conformance is the Is - a Rule:
Guideline: Is - a Rule
For instance, the statement CreditPayment is a Payment makes sense, and conveys the notion of set membership conformance.
What Is a Correct Conceptual Subclass?
From the above discussion, apply the following tests to define a correct subclass when constructing a domain model:
GuidelineA potential subclass should conform to the:
UML Related Interview Questions
|Adv Java Interview Questions||Java collections framework Interview Questions|
|Design Patterns Interview Questions||Rational robot Interview Questions|
|Web semantic Interview Questions||Spring MVC Framework Interview Questions|
|Advanced C++ Interview Questions||Advanced jQuery Interview Questions|
|XML DOM Interview Questions||Object Oriented Analysis and Design Interview Questions|
Object-oriented Analysis And Design
Iterative, Evolutionary, And Agile
Inception Is Not The Requirements Phase
Iteration 1 Basics
System 'sequence Diagrams
Requirements To Design-iteratively
Logical Architecture And Uml Package Diagrams
On To Object Design
Uml Interaction Diagrams
Uml Class Diagrams
Grasp: Designing Objects With Responsibilities
Object Design Examples With Grasp
Designing For Visibility
Mapping Designs To Code
Test - Driven Development And Refactoring
Uml Tools And Uml As Blueprint
Iteration 2 - More Patterns
Quick Analysis Update
Grasp: More Objects With Responsibilities
Applying Gof Design Patterns
Iteration 3 Intermediate Topics
Uml Activity Diagrams And Modeling
Uml State Machine Diagrams And Modeling
Relating Use Cases
Domain Model Refinement
More Ssds And Contracts
Logical Architecture Refinement
More Object Design With Gof Patterns
Designing A Persistence Framework With Patterns
Uml Deployment And Component Diagrams
Documenting Architecture: Uml & The N+1 View Model
More On Iterative Development And Agile Project Management
All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.