PGDCA, BCA, B-Tech, MCA, M-Tech, B.Sc computer science राजस्थान सूचना सहायक व कंप्यूटर शिक्षक विशेष नोट्स: इस अध्याय में हम Extended ER (EER) Features: Generalization and Specialization (विस्तारित ER मॉडल: जनरलाइजेशन (बॉटम-अप) और स्पेशलाइजेशन (टॉप-डाउन)) की संपूर्ण थ्योरी, मुख्य तकनीकी बिंदु, तुलनात्मक तालिका और विगत परीक्षाओं के पैटर्न पर आधारित 20 अति-महत्वपूर्ण बहुविकल्पीय प्रश्न (MCQs) विस्तृत हिंदी व अंग्रेजी व्याख्या सहित पढ़ेंगे।
Overview: Generalization and Specialization are core Extended ER (EER) abstractions forming superclass-subclass IS-A hierarchies with full attribute and relationship inheritance. Specialization follows a top-down design approach, whereas generalization follows a bottom-up abstraction approach.
अध्याय सार: जनरलाइजेशन (Generalization) और स्पेशलाइजेशन (Specialization) एक्सटेंडेड ER (EER) मॉडल के प्रमुख फीचर्स हैं जो सुपरक्लास-सबक्लास (IS-A) पदानुक्रम बनाते हैं। स्पेशलाइजेशन टॉप-डाउन दृष्टिकोण है जबकि जनरलाइजेशन बॉटम-अप दृष्टिकोण का अनुसरण करता है।
Extended ER (EER) Features: Generalization and Specialization: Detailed Notes & Architecture (विस्तारित ER मॉडल: जनरलाइजेशन (बॉटम-अप) और स्पेशलाइजेशन (टॉप-डाउन))
1. Specialization (Top-Down Approach) & Inheritance (स्पेशलाइजेशन (टॉप-डाउन दृष्टिकोण) और इनहेरिटेंस)
[EN] Specialization is the top-down process of defining a set of distinct subclasses from an existing higher-level entity type (superclass) based on specific distinguishing characteristics or roles. For instance, an Employee superclass can be specialized into Secretary (TypingSpeed), Technician (TGrade), and Engineer (EngType). Every subclass inherits ALL attributes and ALL relationship participations of its superclass via the 'IS-A' relationship.
[HI] स्पेशलाइजेशन एक टॉप-डाउन प्रक्रिया है जिसमें पहले से मौजूद उच्च-स्तरीय सुपरक्लास को विशेष गुणों या भूमिकाओं के आधार पर कई उप-वर्गों (Subclasses) में विभाजित किया जाता है। जैसे Employee को Engineer, Technician और Secretary में बांटना। 'IS-A' संबंध के कारण प्रत्येक सबक्लास अपने सुपरक्लास के सभी एट्रिब्यूट्स व रिलेशनशिप्स को स्वतः प्राप्त (Inherit) कर लेता है।
2. Generalization (Bottom-Up Abstraction) (जनरलाइजेशन (बॉटम-अप दृष्टिकोण))
[EN] Generalization is the reverse, bottom-up process in which multiple lower-level entity sets sharing common attributes are synthesized into a single generalized higher-level superclass. For example, Car (LicensePlate, MaxSpeed, NoOfPassengers) and Truck (LicensePlate, MaxSpeed, Tonnage) can be generalized into a superclass Vehicle holding the common LicensePlate and MaxSpeed attributes. Graphically in EER diagrams, both specialization and generalization share the exact same hierarchy notation.
[HI] जनरलाइजेशन एक बॉटम-अप प्रक्रिया है जिसमें समान गुणों वाले अलग-अलग निम्न-स्तरीय एंटिटी सेट्स को मिलाकर एक सामान्य सुपरक्लास बनाया जाता है। जैसे Car और Truck के समान गुणों (पंजीकरण संख्या, मूल्य) को निकालकर Vehicle सुपरक्लास बनाना। EER डायग्राम के अंतिम रूप में जनरलाइजेशन और स्पेशलाइजेशन दोनों एक ही सुपरक्लास-सबक्लास संरचना के रूप में दिखते हैं।
3. Disjointness vs Completeness Constraints (d, o, Total, Partial) (डिसजॉइंटनेस (d/o) बनाम कम्प्लीटनेस (Total/Partial) बाधाएं)
[EN] EER hierarchies enforce two orthogonal constraints. First, the Disjointness constraint decides whether subclasses are Disjoint ('d' inside circle—an entity belongs to AT MOST ONE subclass) or Overlapping ('o'—an entity may belong to MULTIPLE subclasses simultaneously, e.g., Student AND Employee). Second, the Completeness constraint decides Total (double line from superclass to circle—every superclass entity MUST belong to at least one subclass) vs Partial (single line—superclass entity need not belong to any subclass).
[HI] EER में दो प्रमुख बाधाएं होती हैं: डिसजॉइंटनेस और कम्प्लीटनेस। डिसजॉइंट ('d') का अर्थ है कि एक एंटिटी अधिकतम एक ही सबक्लास में हो सकती है, जबकि ओवरलैपिंग ('o') में वह एक साथ कई सबक्लास (जैसे छात्र व कर्मचारी दोनों) में हो सकती है। कम्प्लीटनेस में पूर्ण (Total - डबल लाइन) का अर्थ है कि सुपरक्लास की प्रत्येक एंटिटी को किसी न किसी सबक्लास में होना आवश्यक है, जबकि आंशिक (Partial - सिंगल लाइन) में ऐसा अनिवार्य नहीं है।
4. Mapping EER Specialization/Generalization to Relational Tables (EER पदानुक्रम को रिलेशनल टेबल्स में बदलने की 4 विधियां)
[EN] Elmasri & Navathe define four mapping strategies for converting superclass C and subclasses S1..Sm: (8A) Separate table for C and separate table for each Si sharing PK of C (universal, works for any constraint); (8B) Tables ONLY for subclasses Si with inherited attributes copied down (valid ONLY when Total AND Disjoint); (8C) Single merged table containing all attributes plus one type-discriminator column (best for Disjoint, creates NULLs); (8D) Single merged table with multiple boolean flag columns (supports Overlapping).
[HI] सुपरक्लास-सबक्लास को टेबल्स में बदलने के चार तरीके हैं: (8A) सुपरक्लास व प्रत्येक सबक्लास की अलग टेबल; (8B) केवल सबक्लास टेबल्स बनाना (यह केवल Total और Disjoint होने पर ही वैध है); (8C) सभी एट्रिब्यूट्स को एक ही टेबल में एक 'Type' कॉलम के साथ रखना (Disjoint हेतु उपयुक्त); तथा (8D) एक ही टेबल में कई बूलियन फ्लैग कॉलम जोड़ना (Overlapping हेतु उपयुक्त)।
Syntax, Formula & Technical Example (Extended ER (EER) Features: Generalization and Specialization)
-- Strategy 8A: Separate Superclass + Subclasses sharing the same Primary Key
CREATE TABLE Employee (Emp_ID INT PRIMARY KEY, Name VARCHAR(60), Salary DECIMAL(10,2));
CREATE TABLE Engineer (
Emp_ID INT PRIMARY KEY REFERENCES Employee(Emp_ID) ON DELETE CASCADE,
Eng_Type VARCHAR(30)
);
CREATE TABLE Secretary (
Emp_ID INT PRIMARY KEY REFERENCES Employee(Emp_ID) ON DELETE CASCADE,
Typing_Speed INT
);
Extended ER (EER) Features: Generalization and Specialization Quick Reference & Comparison Table
| EER Concept / Constraint | Technical Meaning & Symbol | Design Rule / Mapping Implication |
|---|---|---|
| Specialization | Top-down splitting of Superclass into Subclasses | Highlights subgroup-specific attributes and relations |
| Generalization | Bottom-up merging of Subclasses into Superclass | Eliminates duplicate common attributes across entities |
| Disjoint ('d') | Superclass member belongs to at most 1 subclass | Maps cleanly via single discriminator type column |
| Overlapping ('o') | Superclass member can belong to >=1 subclasses | Requires separate tables or multiple boolean flags |
Extended ER (EER) Features: Generalization and Specialization Top 20 Bilingual MCQs with Answers
Q1. Which design methodology correctly describes Specialization in Extended ER modeling?
(एक्सटेंडेड ER मॉडल में स्पेशलाइजेशन (Specialization) किस डिज़ाइन पद्धति का अनुसरण करता है?)
(A) Circular approach (weak entity merging)
(B) Top-down approach (dividing a superclass into specialized subclasses)
(C) Flat approach (removing all relationships)
(D) Bottom-up approach (combining entities into a superclass)
Correct Answer: (B)
[EN] Specialization starts from a general superclass at the top and refines it into specialized subclasses below.
[HI] स्पेशलाइजेशन एक टॉप-डाउन प्रक्रिया है जो ऊपर स्थित सुपरक्लास को नीचे विशिष्ट सबक्लासों में बांटती है।
Q2. Which design methodology describes Generalization in EER diagrams?
(EER डायग्राम में जनरलाइजेशन (Generalization) किस डिज़ाइन पद्धति का उदाहरण है?)
(A) Normal-form decomposition only
(B) Hash indexing
(C) Bottom-up approach (abstracting common traits into a superclass)
(D) Top-down approach
Correct Answer: (C)
[EN] Generalization moves bottom-up by unifying shared attributes of existing entity sets into one superclass.
[HI] जनरलाइजेशन नीचे स्थित समान एंटिटी सेट्स से साझा गुण निकालकर ऊपर एक सुपरक्लास बनाने की बॉटम-अप प्रक्रिया है।
Q3. What does the 'IS-A' relationship signify between a Subclass and its Superclass?
(सबक्लास और सुपरक्लास के बीच 'IS-A' संबंध क्या दर्शाता है?)
(A) A derived multivalued attribute
(B) Inheritance of all superclass attributes and relationship participations by the subclass
(C) A many-to-many foreign key table
(D) Deletion of superclass attributes
Correct Answer: (B)
[EN] Every subclass entity IS-A superclass entity, so it inherits all attributes and relationships of the parent.
[HI] IS-A का अर्थ इनहेरिटेंस है, अर्थात सबक्लास अपने सुपरक्लास के सभी एट्रिब्यूट्स और संबंध स्वतः प्राप्त करता है।
Q4. In an EER diagram, what does the letter 'd' inside the specialization circle represent?
(EER डायग्राम में स्पेशलाइजेशन सर्कल के भीतर अक्षर 'd' क्या प्रदर्शित करता है?)
(A) Domain integrity constraint
(B) Disjoint constraint (an entity can belong to at most one subclass)
(C) Derived attribute constraint
(D) Double participation constraint
Correct Answer: (B)
[EN] 'd' stands for Disjoint: subclasses are mutually exclusive for any single superclass entity.
[HI] सर्कल के भीतर 'd' का अर्थ Disjoint है, अर्थात एक एंटिटी एक समय में अधिकतम एक ही सबक्लास की सदस्य हो सकती है।
Q5. What does the letter 'o' inside a specialization circle denote?
(स्पेशलाइजेशन सर्कल के अंदर लिखा अक्षर 'o' किस नियम को दर्शाता है?)
(A) Owner-weak entity rule
(B) Optional key constraint
(C) Outer join constraint
(D) Overlapping constraint (an entity may belong to multiple subclasses simultaneously)
Correct Answer: (D)
[EN] 'o' stands for Overlapping, allowing an entity (e.g., University Member) to be both Student and Teaching Assistant.
[HI] 'o' का अर्थ Overlapping है, जिससे कोई एक एंटिटी एक साथ एक से अधिक सबक्लासों (जैसे छात्र व कर्मचारी दोनों) में आ सकती है।
Q6. When is mapping EER subclasses ONLY (Option 8B: creating no separate table for the superclass) strictly valid without losing data or creating duplicate records?
(सुपरक्लास की अलग टेबल न बनाकर केवल सबक्लासों की टेबल्स बनाना (Option 8B) कब बिना डेटा हानि या दोहराव के वैध होता है?)
(A) Only when the specialization is BOTH Total and Disjoint
(B) When the specialization is Partial and Disjoint
(C) When the specialization is Partial and Overlapping
(D) Always valid regardless of constraints
Correct Answer: (A)
[EN] Total guarantees no superclass entity is left out, and Disjoint guarantees no entity is duplicated across multiple subclass tables.
[HI] केवल Total और Disjoint होने पर ही न तो कोई सुपरक्लास एंटिटी छूटती है और न ही किसी का डेटा दो सबक्लास टेबल्स में दोहराया जाता है।
Q7. How is a Total Specialization indicated visually in an EER diagram?
(EER डायग्राम में पूर्ण स्पेशलाइजेशन (Total Specialization) को दृश्य रूप से कैसे दिखाया जाता है?)
(A) Double line connecting the superclass to the specialization circle
(B) Arrow pointing from subclass to superclass without circle
(C) Dashed oval around the circle
(D) Single line labeled with 'T'
Correct Answer: (A)
[EN] Just like total participation, a double line from superclass to circle shows every superclass instance must belong to a subclass.
[HI] सुपरक्लास से सर्कल तक जाने वाली डबल लाइन यह दर्शाती है कि सुपरक्लास की प्रत्येक एंटिटी का किसी न किसी सबक्लास में होना जरूरी है।
Q8. What happens in a Partial Specialization?
(आंशिक स्पेशलाइजेशन (Partial Specialization) में क्या होता है?)
(A) A superclass entity is NOT required to belong to any subclass
(B) Every entity must belong to all subclasses
(C) Subclasses cannot inherit primary keys
(D) Common attributes are deleted from superclass
Correct Answer: (A)
[EN] Partial specialization (single line) permits superclass members that do not fall into any defined subclass.
[HI] आंशिक स्पेशलाइजेशन (सिंगल लाइन) में सुपरक्लास की कुछ एंटिटीज़ ऐसी हो सकती हैं जो किसी भी सबक्लास का हिस्सा न हों।
Q9. In Option 8C (single table for superclass + all subclasses with a Type column), what is the main drawback when subclasses have many specialized attributes?
(Option 8C (सभी सबक्लासों को एक ही टेबल में Type कॉलम सहित मर्ज करने) की मुख्य कमी क्या होती है?)
(A) Violates First Normal Form atomicity
(B) Generates numerous NULL values for attributes belonging to other subclasses
(C) Prevents creating a Primary Key
(D) Makes single-entity queries slower via joins
Correct Answer: (B)
[EN] Columns specific to Engineer remain NULL on rows representing Secretaries, wasting space when subclass attributes are numerous.
[HI] एक सबक्लास के विशेष कॉलम दूसरी सबक्लास की पंक्तियों में NULL रह जाते हैं, जिससे अत्यधिक NULL मान उत्पन्न होते हैं।
Q10. What distinguishes an Attribute-Defined (Predicate-Defined) Specialization from a User-Defined Specialization?
(एट्रिब्यूट-डिफ़ाइंड (प्रेडिकेट-डिफ़ाइंड) स्पेशलाइजेशन और यूज़र-डिफ़ाइंड स्पेशलाइजेशन में क्या अंतर है?)
(A) User-defined requires no superclass
(B) Attribute-defined cannot be disjoint
(C) Predicate-defined never supports inheritance
(D) Membership is determined automatically by a condition on a superclass attribute (e.g., JobType = 'Engineer')
Correct Answer: (D)
[EN] In predicate-defined specialization, a condition on an attribute (like EmpType) places entities automatically; user-defined is assigned manually.
[HI] प्रेडिकेट-डिफ़ाइंड में सुपरक्लास के किसी एट्रिब्यूट की शर्त के आधार पर सबक्लास स्वतः तय होती है, जबकि यूज़र-डिफ़ाइंड में उपयोगकर्ता मैन्युअली तय करता है।
Q11. What is the Primary Key of each subclass table when using Strategy 8A (Superclass table + Subclass tables)?
(रणनीति 8A (सुपरक्लास टेबल + अलग सबक्लास टेबल्स) में प्रत्येक सबक्लास टेबल की प्राइमरी की क्या होती है?)
(A) The exact same Primary Key inherited from the Superclass (also serving as a Foreign Key)
(B) No primary key is allowed
(C) A completely unrelated sequential ID
(D) Only the specialized subclass attribute
Correct Answer: (A)
[EN] Each subclass row maps 1:1 to its superclass row by sharing the superclass PK as both PK and FK.
[HI] प्रत्येक सबक्लास टेबल की प्राइमरी की उसके सुपरक्लास से विरासत में मिली वही प्राइमरी की होती है जो फॉरेन की का भी काम करती है।
Q12. What is a Specialization Lattice (Multiple Inheritance) in EER modeling?
(EER मॉडल में स्पेशलाइजेशन लैटिस (Multiple Inheritance) क्या है?)
(A) A cycle where a subclass is its own parent
(B) A shared subclass having more than one superclass (e.g., Engineering_Manager inheriting from Engineer and Manager)
(C) A tree where every subclass has exactly one parent
(D) A superclass with zero subclasses
Correct Answer: (B)
[EN] Unlike a strict specialization hierarchy (tree), a lattice permits a subclass to inherit attributes from multiple superclasses.
[HI] जब कोई एक साझा सबक्लास एक से अधिक सुपरक्लासों से गुण विरासत में लेता है, तो पदानुक्रम ट्री के बजाय स्पेशलाइजेशन लैटिस बन जाता है।
Q13. Consider Vehicle specialized into Land_Vehicle and Water_Vehicle. If an Amphibious Vehicle is both, which constraint applies?
(यदि Vehicle को Land_Vehicle और Water_Vehicle में बांटा जाए और एक उभयचर वाहन दोनों श्रेणियों में आता हो, तो कौन सी बाधा लागू होगी?)
(A) Disjoint ('d')
(B) Weak identification
(C) Overlapping ('o')
(D) Partial exclusion
Correct Answer: (C)
[EN] Because a single vehicle instance simultaneously belongs to two subclasses, the specialization is Overlapping.
[HI] क्योंकि एक ही वाहन एक साथ दोनों सबक्लासों में आता है, इसलिए यह Overlapping ('o') बाधा होगी।
Q14. In Korth's EER notation (without the d/o circle), which symbol represents an IS-A specialization hierarchy?
(कोर्थ (Korth) के EER डायग्राम में (बिना d/o सर्कल के) IS-A स्पेशलाइजेशन को किस प्रतीक से दर्शाया जाता है?)
(A) A double diamond
(B) A dashed hexagon
(C) A circle with U
(D) A triangle labeled 'ISA' connecting superclass to subclasses
Correct Answer: (D)
[EN] Korth denotes specialization/generalization using a triangle labeled ISA pointing from subclasses up to the superclass.
[HI] कोर्थ की पुस्तक में सुपरक्लास और सबक्लास के बीच 'ISA' लिखा हुआ एक त्रिभुज (Triangle) बनाया जाता है।
Q15. Which subclass mapping strategy requires adding one boolean flag column per subclass inside a single combined relation?
(किस मैपिंग विधि में एक ही संयुक्त टेबल के भीतर प्रत्येक सबक्लास के लिए एक-एक बूलियन फ्लैग कॉलम जोड़ा जाता है?)
(A) Weak entity normalization
(B) Option 8A (Multiple relations)
(C) Option 8D (Single relation with multiple type boolean attributes) for Overlapping subclasses
(D) Option 8B (Subclass relations only)
Correct Answer: (C)
[EN] When subclasses overlap, one single-valued type column cannot store multiple roles, so multiple boolean flags (Is_Engineer, Is_Manager) are used.
[HI] Overlapping में कोई एंटिटी एक साथ कई सबक्लासों में हो सकती है, इसलिए ऑप्शन 8D में हर सबक्लास हेतु अलग बूलियन कॉलम रखा जाता है।
Q16. Which statement about Generalization and Specialization is FALSE?
(जनरलाइजेशन और स्पेशलाइजेशन के संबंध में कौन सा कथन असत्य (FALSE) है?)
(A) Generalization follows a bottom-up design process
(B) Subclasses can have their own specific attributes and participate in unique relationships
(C) Specialization follows a top-down design process
(D) Subclasses inherit attributes of the superclass only if the specialization is Total
Correct Answer: (D)
[EN] Attribute and relationship inheritance holds universally for ALL subclasses regardless of whether specialization is total or partial.
[HI] चाहे स्पेशलाइजेशन पूर्ण (Total) हो या आंशिक (Partial), प्रत्येक सबक्लास हमेशा सुपरक्लास के सभी एट्रिब्यूट्स को इनहेरिट करता है।
Q17. Within Extended ER (EER) Features: Generalization and Specialization, which eer concept / constraint directly maps to: "Top-down splitting of Superclass into Subclasses"?
(Extended ER (EER) Features: Generalization and Specialization में कौन सा EER Concept / Constraint सीधे "Top-down splitting of Superclass into Subclasses" से संबंधित है?)
(A) Generalization
(B) Disjoint ('d')
(C) Specialization
(D) Overlapping ('o')
Correct Answer: (C)
[EN] In Extended ER (EER) Features: Generalization and Specialization, 'Specialization' handles 'Top-down splitting of Superclass into Subclasses' (Highlights subgroup-specific attributes and relations).
[HI] Extended ER (EER) Features: Generalization and Specialization में 'Specialization' का कार्य/विवरण 'Top-down splitting of Superclass into Subclasses' (Highlights subgroup-specific attributes and relations) है।
Q18. Which option accurately describes 'Generalization' in Extended ER (EER) Features: Generalization and Specialization?
(Extended ER (EER) Features: Generalization and Specialization के संदर्भ में 'Generalization' की सही विशेषता कौन सी है?)
(A) Bottom-up merging of Subclasses into Superclass
(B) Superclass member can belong to >=1 subclasses
(C) Superclass member belongs to at most 1 subclass
(D) Top-down splitting of Superclass into Subclasses
Correct Answer: (A)
[EN] 'Generalization' provides 'Bottom-up merging of Subclasses into Superclass' — key point: Eliminates duplicate common attributes across entities.
[HI] 'Generalization' का मुख्य विवरण 'Bottom-up merging of Subclasses into Superclass' है (Eliminates duplicate common attributes across entities)।
Q19. In Extended ER (EER) Features: Generalization and Specialization, identify the correct parameter for the specification: "Superclass member belongs to at most 1 subclass".
(Extended ER (EER) Features: Generalization and Specialization में "Superclass member belongs to at most 1 subclass" विवरण किस विकल्प के लिए सही है?)
(A) Specialization
(B) Generalization
(C) Disjoint ('d')
(D) Overlapping ('o')
Correct Answer: (C)
[EN] 'Disjoint ('d')' corresponds to 'Superclass member belongs to at most 1 subclass' (Maps cleanly via single discriminator type column).
[HI] 'Disjoint ('d')' का संबंध 'Superclass member belongs to at most 1 subclass' (Maps cleanly via single discriminator type column) से है।
Q20. Considering Extended ER (EER) Features: Generalization and Specialization, what key behavior defines 'Overlapping ('o')'?
(Extended ER (EER) Features: Generalization and Specialization में 'Overlapping ('o')' की मुख्य भूमिका या मान क्या है?)
(A) Bottom-up merging of Subclasses into Superclass
(B) Superclass member belongs to at most 1 subclass
(C) Top-down splitting of Superclass into Subclasses
(D) Superclass member can belong to >=1 subclasses
Correct Answer: (D)
[EN] 'Overlapping ('o')' represents 'Superclass member can belong to >=1 subclasses' (Requires separate tables or multiple boolean flags).
[HI] 'Overlapping ('o')' का अर्थ/मान 'Superclass member can belong to >=1 subclasses' है (Requires separate tables or multiple boolean flags)।
Extended ER (EER) Features: Generalization and Specialization — Exam FAQs
Q1: Why do Specialization and Generalization look identical in a finished EER diagram?
तैयार EER डायग्राम में स्पेशलाइजेशन और जनरलाइजेशन एक जैसे क्यों दिखाई देते हैं?
[EN] Because they describe opposite thought processes during database design (top-down splitting vs bottom-up merging), yet both result in the exact same superclass-subclass IS-A hierarchy.
[HI] दोनों डेटाबेस डिज़ाइन करते समय सोचने की विपरीत दिशाएं (टॉप-डाउन बनाम बॉटम-अप) हैं, परंतु दोनों का अंतिम परिणाम समान सुपरक्लास-सबक्लास संरचना ही होता है।
Q2: Should I use Disjoint or Overlapping for Faculty and Student subclasses of Person?
Person के सबक्लासों Faculty और Student के लिए Disjoint चुनना चाहिए या Overlapping?
[EN] Choose Overlapping ('o') if a PhD student or staff member can simultaneously be enrolled as a Student and employed as Faculty; use Disjoint ('d') only if institutional rules strictly forbid holding both roles.
[HI] यदि कोई व्यक्ति एक ही समय में छात्र और शिक्षक दोनों हो सकता है तो Overlapping ('o') चुनें; यदि नियम इसकी अनुमति नहीं देते तो Disjoint ('d') उपयुक्त है।
Q3: Can a subclass itself act as a superclass for deeper subclasses?
क्या कोई सबक्लास स्वयं आगे अन्य सबक्लासों के लिए सुपरक्लास बन सकता है?
[EN] Yes. Subclasses can be further specialized into multi-level hierarchies (e.g., Person -> Employee -> Engineer -> Software_Engineer), inheriting all attributes from every ancestor.
[HI] हाँ, सबक्लासों को आगे और गहराई तक विभाजित कर बहु-स्तरीय पदानुक्रम बनाया जा सकता है और निचला वर्ग सभी पूर्वजों के गुण प्राप्त करता है।
Post a Comment
Post a Comment