一道关于高朋网(Groupon)的设计模式题(英文版)

194 篇文章 13 订阅
189 篇文章 408 订阅

从国外某大学设计模式课程试卷上找到的一道设计模式试题,Sunny暂不翻译,吐舌头,大家可以尝试做做先!

 

Groupon has already been called the “fastest growing company in history” by the Forbes magazine. In it’s second full year of business, 2010,  it pulled down $713.4 million in revenue. The revenue a year earlier was only $30.47 million. That’s a growth rate of 2,241%. Yes you read it correctly. Now let us see what is how their business model is working:

 

When you check the Groupon website you will see webpage like the one shown below:
 


The webpage shows deeply discounted offers from different business located in the city where you are living.  The figure shows a beauty salon offer that has a 50% discount on women’s haircut. You do nothing if you are not interested. If you like the Groupon deal, you select “buy” before the expiration date and your credit card is charged. If enough people select the deal, you will be sent a link for your rebate coupon at the end of the offer. Once you receive your coupon you can claim it at the specified store, usually within a period of time before it expires as noted on the website. If enough people do not join for that deal, the Groupon is cancelled and no one gets it and in this case you will get a refund for your money. You can see in the left down corner of the figure that the deal is on because more than 15 people has already joined the deal. In case that you have changed your mind you can also cancel an already made order and you will get a full refund. Clever, isn’t it?
 
Which design pattern you would use to implement the Groupon application? Please give a short explanation why.  In particular, show an appropriate class diagram(s) and/or enough code fragments to illustrate your use of the pattern to solve the problem. 

 

【作者:刘伟 http://blog.csdn.net/lovelion

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值