1 / 6

Modeling Subclasses

Explore the concepts of subclasses and multiple inheritance in modeling. Understand how objects in a class can have unique properties and how conflicts are resolved. Learn about subclasses in ODL and E/R diagrams.

bayp
Download Presentation

Modeling Subclasses

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Modeling Subclasses The world is not flat! Some objects in a class may have properties not shared by other members: Products Software products Educational products So --- we define subclasses (in ODL and in E/R).

  2. Subclasses in ODL Interface 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.

  3. Multiple Inheritance Product Platforms required memory ageGroup topic Educational Product Software Product Educational-method Educ-software Product

  4. How do we resolve conflicts? Rating (ATA) Product Platforms required memory ageGroup topic Educational Product Software Product Rating (ASA) Educational-method Educ-software Product Rating?

  5. Subclasses in E/R Diagrams name category price Product isa isa Software Product Educational Product platforms Age Group

  6. In ODL: Every object belongs to a single class In E/R: An entity may be spread out in multiple sets. name category price Product isa isa Software Product Educational Product platforms Age Group

More Related