Generalization, Specialization, and Inheritance
Terms such as superclass, subclass, or inheritance come to mind when thinking about the object-oriented approach. These concepts are very important when dealing with object-oriented programming languages such as Java, Smalltalk, or C++. For modeling classes that illustrate technical concepts they are secondary. The reason for this is that modeling relevant objects or ideas from the real world gives little opportunity for using inheritance (compare the class diagram of our case study). Nevertheless, we would like to further introduce these terms at this point in Figure 4.26:
Generalization is the process of extracting shared characteristics from two or more classes, and combining them into a generalized superclass. Shared characteristics can be attributes, associations, or methods.
In Figure 4.27, the classes Piece of Luggage(1) and Piece of Cargo(2) partially share the same attributes. From a domain perspective, the two classes are also very similar. During generalization, the shared characteristics (3) are combined and used to create a new superclass Freight(4). Piece of Luggage(5) and Piece of Cargo(6) become subclasses of the class Freight.
The shared attributes (3) are only listed in the superclass, but also apply to the two subclasses, even though they are not listed there.
Consider whether some of the classes that you found could be generalized.
In contrast to generalization, specialization means creating new subclasses from an existing class. If it turns out that certain attributes, associations, or methods only apply to some of the objects of the class, a subclass can be created. The most inclusive class in a generalization/specialization is called the superclass and is generally located at the top of the diagram. The more specific classes are called subclasses and are generally placed below the superclass.
In Figure 4.28, the class Freight(1) has the attribute Degree of Hazardousness(2), which is needed only for cargo, but not for passenger luggage. Additionally (not visible in Figure 4.28), only passenger luggage has a connection to a coupon. Obviously, here two similar but different domain concepts are combined into one class. Through specialization the two special cases of freights are formed: Piece of Cargo(3) and Piece of Luggage(4). The attribute Degree of Hazardousness(5) is placed where it belongs—in Piece of Cargo. The attributes of the class Freight(1) also apply to the two subclasses Piece of Cargo(3) and Piece of Luggage(4):
Consider whether some of the classes that you found could be specialized.
So much for the mechanism. However, the domain meaning of the relationship between superclass and subclass is much more important. These rules apply to this relationship:
- All statements that are made about a superclass also apply to all subclasses. We say that subclasses "inherit" attributes, associations, and operations from the superclass. For example: If the superclass Freight has an attribute Weight, then the subclass piece of luggage also has an attribute Weight, even though this attribute is not listed in the subclass Piece of Luggage.
- Anything that can be done with an object of the superclass can also be done with an object of the subclass. For example: If freight can be loaded, pieces of luggage can also be loaded.
- In the terminology of the system that is being modeled, a subclass has to be a special form of the superclass. For example: A piece of luggage is a special case of freight. The counter-example to this is: A flight is not a special case of a flight number.
As addictive as business week (a big timewaste) or gmatclub mba forums have been during the application process, I guess its time to move on to the next part. After putting months into figuring out the right career objective statements etc and then getting the final admit, I am more interested in reading what current students have to say – to figure out what mistakes not to make. And thus I came across this genuinely insightful post from Orlando.
My Dad says your value doesn’t depend as much on what you do as it does on how well you do whatever it is that you do. Going an extra step and paying attention to details start becoming increasingly important. It also raises a important concern – how much specialization should I aim for? It becomes a trade off between playing safe and showing extra confidence in yourself.
Going back to Class XI, I took both Biology and Mathematics because I wanted to keep both options open (Indians would understand). By some luck and extra effort, I cracked both Medical and Engineering entrance exams in India. But at this point, I had to make a choice. Now lets see, what did I gain – ability to hedge my position (a backup which makes me laugh now, I was backing up my option to be a doctor by another to become an engineer! I know how ridiculous it sounds now. These streams are world apart, one shouldn’t just become a doctor because he couldn’t be an engineer and vice versa. But forgive me for rambling, that is the issue with Indian society and education system, I’ll save it for some other post.) What did I lose? – I could have cracked a better exam if I had focused on only one stream. And I know whole ‘entrance exam’ mania in India is also crazy but just a point that if I was focused enough, I could have gone to a better college.
Why am I wondering now? All the major B schools provide specializations for MBA. Stern allows up to 3, same for Kellogg and so on. Even if you don’t target specialization per se, I am talking about taking electives. Obviously there are limited electives you can take, so how would you want to spread it out? I was talking to a Media professional who is an MBA and very very interested in sports like me. He said sports management is such a niche field that even if the school provided it as a major, he wouldn’t have taken it. Thankfully Media Management has outgrown that size and is more of a mainstream option now. It is my intended field of specialization as of now. But for others, I am not so sure. Is it better to combine it with marketing or consulting etc etc.
Anyways, here are some questions that fellow MBA applicants or students may be able to answer more intelligently-
- How do employers view your electives? What is the criteria for initial interview selection?
- How does it impact overall job hunt?
- Will a marketing company be reluctant to hire you if you didn’t specialize in Marketing but only took few electives?
- For eg. there is a course called Corporate Finance in Media and a generic Corporate Finance course. By taking the former, I might be more lucrative to a Media employer (will I be?) but I might miss out on other firms?
I am just wondering whats the best approach and I understand it will be subjective. So, any ‘lessons learned’ or comments from existing students would be awesome. Also, whats the take of other applicants. Sometimes, the jack can outweigh the master.