aspose file tools*
The moose likes OO, Patterns, UML and Refactoring and the fly likes How will you design the classes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "How will you design the classes " Watch "How will you design the classes " New topic
Author

How will you design the classes

abhijitg ga
Greenhorn

Joined: Mar 01, 2012
Posts: 9
1. How will you design a BOOK and a AUTHOR class?
What kind of association will be between them ?
How would you instantiate them?
Which pattern will you select?



Rajkamal Pillai
Ranch Hand

Joined: Mar 02, 2005
Posts: 443
    
    1


Book HAS-A Author.

For creation use -
1. Factory
2. Dependency Injection.


I am all for DI as it removes tight coupling and is configurable as well.

Cheers,
Raj.
E Armitage
Rancher

Joined: Mar 17, 2012
Posts: 761
    
    9
A book has one or more authors.
Creation strategy depends on how the information to create the book is going to be made available and how complex it is to create a book instance.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How will you design the classes
 
Similar Threads
How to measure a designs "goodness"
What does technical risk means?
What If i don't use any Design Patterns?
Design Patterns
cach?