Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Jun 2009
    Thanked 0 Times in 0 Posts

    Can somebody explain the interface in this uml diagram

    can somebody explain the class diagram attached and more specifically the interface part.
    Attached Thumbnails Attached Thumbnails -class-diagram1-jpg  

  2. #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Saskatoon, Saskatchewan
    Thanked 2,668 Times in 2,637 Posts
    This just states that a room contains four walls, has two bookshelves and on the bookshelves is any number of items. I cannot tell looking at it if item is a concrete class or not, but we know that both Book and Toy are also of type item.
    The interface merely states that anything of type shelf has the ability to addItem and removeItem. I'm not sure if the diagram is incorrect here, but the shelf carries no specific purpose of its own since a wall can only contain a bookshelf and not a shelf. If a wall could contain a shelf, then it should be aggregating the shelf and not the bookshelf.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts