Hey there! Sign in to join this conversationNew here? Join for free
    • Thread Starter
    Offline

    0
    ReputationRep:
    Hi can any1 help me figure out the following inheritance digrams:

    Q) Draw an inheritance diagram that shows the inheritance relationships between the classes:

    Person
    Employee
    Student
    Instructor
    Classroom
    Object

    i know that inheritance design is an arrow with black head
    (abit hard to draw in here)
    • Thread Starter
    Offline

    0
    ReputationRep:
    I came up with the answer as:

    Classroom (superclass)

    An object "is a" classroom (going to extend to classroom)
    A student "is a" classroom ( going to extend to classroom)
    A student "is a" person ( going to entend to person)
    Person "is a" student ( going to extend to student)
    Employee "is a" person (going to extend to person)
    Instructor "is a" person (going to extend to person)

    i did draw them in uml way isnt easy to show here any1 let me know if am correct?
    Offline

    0
    ReputationRep:
    That sounds wrong... Sounds like you've got everything backwards for a start, and why is a student a classroom?
    Offline

    15
    ReputationRep:
    Why post the same thing in two forums?

    (Original post by Fallen)
    Spoiler:
    Show

    @Arslan777:
    Why is a classroom the superclass...?
    Why does Person extend Student, and Student extend Person?
    Etc...?
 
 
 
Reply
Submit reply
TSR Support Team

We have a brilliant team of more than 60 Support Team members looking after discussions on The Student Room, helping to make it a fun, safe and useful place to hang out.

Updated: December 26, 2010
  • See more of what you like on The Student Room

    You can personalise what you see on TSR. Tell us a little about yourself to get started.

  • Poll
    What newspaper do you read/prefer?
    Useful resources
  • See more of what you like on The Student Room

    You can personalise what you see on TSR. Tell us a little about yourself to get started.

  • The Student Room, Get Revising and Marked by Teachers are trading names of The Student Room Group Ltd.

    Register Number: 04666380 (England and Wales), VAT No. 806 8067 22 Registered Office: International House, Queens Road, Brighton, BN1 3XE

    Quick reply
    Reputation gems: You get these gems as you gain rep from other members for making good contributions and giving helpful advice.