Enter your Email Address:

Delivered by FeedBurner

To get posts delivered to your Email

08 December 2010

Software Design Puzzle #4 - Apple Farm

This time, it is producers and consumers. Here is the story

There is a apple farm and the season is at its peak. The farm has many trees and each tree has numerous apples. The owner decides to harvest the apple and invites bids from various folks who are interested to buy apples. Some of them want the apples to be sent to their places and some of them are ready to reach the farm to procure the apples. So, the farmer plans for the harvest. He employs few hundreds of people - some to pick apples from the tree and some to package/transport apples. And by the way, the farmer sends apple as package of 500 apples.

Can you bring out classes and their relationships to fulfill the above requirements?

2 comments:

Suresh K Muthuramalingam said...

Its really interesting to read the problem statement. Is it your idea or got it from somewhere? If not your, could you please point me to place from where I could read many more such problem statements.

Pls share the design solution if you have.

Lakshmi Narayanan N said...

@Suresh (Sir)

Thank you for making your presence here.

This is not my problem. It is classical problem that was in existence even before i was born :-).

But, i tried to give an example (apple farm) to solve that classical problem.

I didnt mention what that classical problem is. I want you to find the classical problem and solve it so that you give a classical solution.

Generally, i tend to think about these problems when i read books on design/Java/programming. I do have some links on general computing. If you want, i can share here.