Modeling SubclassesSubclasses in ODLMultiple InheritanceHow do we resolve conflicts?Slide 6Modeling SubclassesThe world is not flat!Some objects in a class may have properties not shared by other members: ProductsSoftware productsEducational productsSo --- we define subclasses (in ODL and in E/R).Subclasses in ODLInterface SoftwareProduct: Product{ attribute Set<string> platform; attribute Set<integer> requiredMemory;}Interface EducationalProduct: Product{ attribute Struct Interval {integer begin, integer end} ageGroup; attribute string topic}The two classes also inherit all the properties of Product.Multiple Inheritance ProductEducational ProductEduc-softwareProductSoftware ProductageGrouptopicPlatformsrequired memoryEducational-methodHow do we resolve conflicts? ProductEducational ProductEduc-softwareProductSoftware ProductageGrouptopicPlatformsrequired memoryEducational-methodRating(ATA)Rating(ASA)Rating?Productname categorypriceisa isaEducational ProductSoftware ProductAge GroupplatformsSubclasses in E/R DiagramsProductname categorypriceisa isaEducational ProductSoftware ProductAge GroupplatformsIn ODL: Every object belongs to a single classIn E/R: An entity may be spread out in multiple
View Full Document