answersLogoWhite

0

What is specialization & generalization? Explain how generalization is different from specialization

Specialization is a property of inheritance used for creating specialized attributes, methods that only apply to objects of that class. Specialized classes are subclasses placed below super classes. 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. Generalized classes are generally parent classes of specialized classes. In other words generalization is bottom up approach whereas specialization is Top to bottom approach

Example:

In Figure , the classes car and scooter partially share the same attributes. From a domain perspective, the two classes are also very similar. During generalization, the shared characteristics are combined and used to create a new superclass vehicle. car and scooter become subclasses of the class vehicle.

Similarly, the class vehicle has the a special attribute, which is needed only for car, but not for scooter. Additionally there is a special attribute, which is needed only for scooter Obviously, here two similar but different domain concepts are combined into one class. Through specialization the two special cases vehicles are formed The epecial attribute is placed where it belongs-in car /scooter.

User Avatar

Wiki User

12y ago

What else can I help you with?

Related Questions

What is used to explain something complicated with a simple statement?

a generalization


What is used to explain something with a simple statement?

a generalization


Briefly explain how modernism was a critique of western society?

generalization


What is generalization explain in detail?

Generalization is the process by which a model or algorithm applies learned patterns from specific data to new, unseen data. In machine learning, it refers to a model's ability to perform well on a test dataset that it has not encountered during training. Effective generalization ensures that the model captures the underlying trends and relationships within the data rather than memorizing specific examples, which can lead to overfitting. Achieving good generalization is crucial for the model's practical application in real-world scenarios.


Define validity generalization Explain how validity is determined and list three types of validity?

Validity generalization is a statistical approach used to demonstrate that test validities do not vary across situations


Different parameter passing methods with examples?

explain parameter passing methods c program


Breifly explain three different examples of sampling?

simple random, stratified sampling, cluster sampling


Class 9th kinematics chapter full answer give you?

explain different types of motion give two examples


Using specific examples, explain the effect of different environmental factors on phenotype of crop plants and animals?

[object Object]


What is the difference between Picasso's periods?

Click link below! You will see examples of paintings from the different periods. This will explain better than words.


What is bubble sort and explain with examples?

bubbles


What is the function of subject and its examples?

to explain to the reader