Skip to Content.
Sympa Menu

patterns-discussion - Re: [patterns-discussion] A question about Coin and Wallet

patterns-discussion AT lists.cs.illinois.edu

Subject: General talk about software patterns

List archive

Re: [patterns-discussion] A question about Coin and Wallet


Chronological Thread 
  • From: Sergio Bruno Fedi de Oro <sfedi_alt AT yahoo.com>
  • To: "Yan, Hong \[IT\]" <hong.yan AT citigroup.com>, Patterns Discussion <patterns-discussion AT cs.uiuc.edu>
  • Cc: "Yan, Hong \[IT\]" <hong.yan AT citigroup.com>
  • Subject: Re: [patterns-discussion] A question about Coin and Wallet
  • Date: Thu, 11 Sep 2003 15:44:14 -0700 (PDT)
  • List-archive: <http://mail.cs.uiuc.edu/pipermail/patterns-discussion/>
  • List-id: General talk about software patterns <patterns-discussion.cs.uiuc.edu>

> Please be a little patient -:)

Ok. I don't understand all of your pattern references,
but I do have some thoughts about the way you
modelled this problem, that may aid you.

What you are modelling seems to be:
- pieces of metal
- coins
- market values of pieces of metals (i.e. coins)

I don't know what the wallet has to do in this problem,
it seems to be a mere physical container of some coins,
or the coins you happen to have.
But I may have misunderstood your model.

Note that the "value" of a piece of metal,
is not known by it, but by the market in which it is traded.
Moreover, if you want to be really picky, the value of something
is in the context of the transaction that involves it.
That is, I can trade a CD for two pennies with you,
so I "Buy a CD at a 2 pennies cost"
and then you can sell it at 4 pennies.
In either case, the cost of the CD varied, but so it happened to the pennies.

This same problem can be thought in this other way:

- there are pieces of metal, shaped in a special way
- common market assign a value to these pieces of metals,
in fact, when they are assigned a typical market value,
they are instead named "coins"
- some pieces of metal has special physical properties
that vary it's value in the market
(i.e. collectable coins, special edition coins, coins from another country)

So it seems that a piece of metal could have a collection of
PhysicalProperties,
and that each Market can have a certain ValuePolicy with which it can
assign the value of a particular coin (in it).
Note that the number inscribed in an piece of metal, the composition,
the defects in it's construction, the weigth, etc. are what
make a piece of metal a "coin" or a "collectable coin" or whatever...

Just my 2 cents ;)


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com





Archive powered by MHonArc 2.6.16.

Top of Page