This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to implement this Class Diagram implementation  RSS feed

 
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
Bartender
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
Marshal
Posts: 55680
161
  • 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
Bartender
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
Boost this thread!