I.T. Discussion Community!
-Collapse +Expand
Analyst
Search Analyst Group:

Advanced
-Collapse +Expand Analyst Store
PRESTWOODSTORE

Prestwood eMagazine

September Edition
Subscribe now! It's Free!
Enter your email:

   ► KBRole-Based T...Analysis & UMLUnified Mode...   Print This    All Groups  
  From the February 2016 Issue of Prestwood eMag
 
Analyst Unified Modeling Language (UML):
Generalization
 
Posted 11 years ago on 6/30/2008 and updated 11/5/2008
Take Away: Where you generalize specific classes into general parent classes or take general parent classes and specialize them as needed in child classes. A Generalization relationship is the equivalent of inheritance in object oriented programming (OOP). A Generalization relationship is an "is-a" relationship and is indicated by an arrow with a hollow arrowhead pointing to the parent class. For example, a Honda Accord "is-a" Car.
Analyst Definition Flashcard:
 A flashcard from our Analyst Flashcards Library
 A definition from our Analyst Definitions Page

KB101259

Generalization - Where you generalize specific classes into general parent classes or take general parent classes and specialize them as needed in child classes. A Generalization relationship is the equivalent of inheritance in object oriented programming (OOP). A Generalization relationship is an "is-a" relationship and is indicated by an arrow with a hollow arrowhead pointing to the parent class. For example, a Honda Accord "is-a" Car.

Where you generalize specific classes into general parent classes or take general parent classes and specialize them as needed in child classes. A Generalization relationship is the equivalent of inheritance in object oriented programming (OOP). A Generalization relationship is an "is-a" relationship and is indicated by an arrow with a hollow arrowhead pointing to the parent class. For example, a Honda Accord "is-a" Car.

Generalization is Inheritance

Generalization is inheritance and the terms can almost be used synonymously. In general, I prefer to use the term generalization when talking to analysts trying to understand a problem domain and inheritance when talking to programmers who need to implement an OOP solution.

UML Symbol

UML Generalization Arrow

 

Inheritance versus Interfaces

Inheritance represents an "is-a" relationship as in a Chow is a Dog. Interfaces represent a "behaves-like" or "looks-like" relationship as in a Chow is a Dog and behaves like a TrainedDog.

Pseudo code representing a Chow dog that has been trained.

Class Dog
  Property Color
  Method Bark
End Class
  
Class Chow Inherits Dog
  //Add some Chow feature here.
End Class
  
Interface TrainedDog
  Method Speak
  Method Sit
End Interface
  
Class TrainedChow Inherits Chow Implements TrainedDog
  //A TrainedChow is a Chow which is a Dog and behaves like a TrainedDog.
End Class

More Info

Definition:  Inheritance

Comments

0 Comments.
Share a thought or comment...
 
Write a Comment...
...
Sign in...

If you are a member, Sign In. Or, you can Create a Free account now.


Anonymous Post (text-only, no HTML):

Enter your name and security key.

Your Name:
Security key = P1162A1
Enter key:
Definition Contributed By Mike Prestwood:

Mike Prestwood is a drummer, an author, and creator of the PrestwoodBoards online community. He is the President & CEO of Prestwood IT Solutions. Prestwood IT provides Coding, Website, and Computer Tech services. Mike has authored 6 computer books and over 1,200 articles. As a drummer, he maintains play-drums.com and has authored 3 drum books. If you have a project you wish to discuss with Mike, you can send him a private message through his PrestwoodBoards home page or call him 9AM to 4PM PST at 916-726-5675 x205.

Visit Profile

 KB Article #101259 Counter
13492
Since 6/30/2008

Follow PrestwoodBoards on: 


©1995-2019 PrestwoodBoards  [Security & Privacy]
Professional IT Services: Coding | Websites | Computer Tech