*
The moose likes Java in General and the fly likes Designing a class Shop and a class Address Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Designing a class Shop and a class Address" Watch "Designing a class Shop and a class Address" New topic
Author

Designing a class Shop and a class Address

Ravi kapa
Ranch Hand

Joined: Jan 05, 2012
Posts: 86
Hi...i have a class Shop and its attributes are shopName,shopId,shopType.And i have another class called Address which contains composition relation having attributes street,city,country...like that i have 2 more classes with composition to Shop class..then what my problem is how can i represent thease scenario in coding???
William P O'Sullivan
Ranch Hand

Joined: Mar 28, 2012
Posts: 860

A Shop has an address?

Only one physical address or can two or more shops be at the same address?

Can a shop have more than one address?

These are the data relationships that will determine how to map the entities.

WP
Junilu Lacar
Bartender

Joined: Feb 26, 2001
Posts: 4447
    
    5

Ravi kapa wrote:how can i represent thease scenario in coding???

Yes, that's a good question. So, how did you try to represent it in code? If you post your coding attempt(s), we can give you some feedback.


Junilu - [How to Ask Questions] [How to Answer Questions]
Ravi kapa
Ranch Hand

Joined: Jan 05, 2012
Posts: 86
Hi.i am Thank full for your replays..Anyway i solved it..
Ben Ooms
Ranch Hand

Joined: May 16, 2011
Posts: 44

Ravi kapa wrote:Hi.i am Thank full for your replays..Anyway i solved it..


Let us know how you solved it. So that when another has a similar problem they can use this post to get some idea about solving their problem.

Regards,
Ben
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Designing a class Shop and a class Address
 
Similar Threads
Is there a useful distinction between composition and aggregation?
check the class diagram
Passing more than one data to bean
Action forms
Class diagrams - oo design