Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to implement this Class Diagram implementation

 
david colais
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to implement the diagram in this link:[deleted]
 
Wouter Oet
Saloon Keeper
Posts: 2700
IntelliJ IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please just post the image next time. Not all of us want to wait almost a minute for a simple image. Or at least create a link instead of posting an url.

I would say draw some lines and text and you're done. Or just use an existing uml tool.
 
Campbell Ritchie
Sheriff
Posts: 48652
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your diagram shows two classes

It should be easy enough to implement, but you will have to work out how to get several "Item" objects associated with one "Grocery" object. Grocery is not standard English; ShoppingBasket would be more usual. That diagram, with no methods or fields, appears to be designed for writing SQL.

Please don't use zShare any more, which appears to be not far off a pornographic site, and I shall remove the link from your posting. You would have done better to copy the diagram, as Wouter has already said.
 
Wouter Oet
Saloon Keeper
Posts: 2700
IntelliJ IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why did I got the idea that you wanted to draw a diagram with Java ??

Just create 2 classes and use a Collection for the multiplicity.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic