thoughtswork公司的面试题目

 Thanks   again   for   your   interest   in   ThoughtWorks.   Enclosed   are   three    
  programming   problems.   We   ask   that   you   read   all   three   descriptions    
  thoroughly   then   create   a   program   to   solve   **ONE**   of   the   problems.   If   you    
  choose   to   do   more   than   one   problem,   we   will   choose   and   evaluate   only   one   of    
  your   solutions.    
   
  For   the   solution,   we   prefer   you   use   either   Java   or   C#.   You   may   use    
  external   libraries   or   tools   for   building   or   testing   purposes.    
  Specifically,   you   may   use   JUnit   or   Ant   to   assist   your   development.   For    
  security   reasons,   please   do   NOT   submit   your   C#   code   as   a   .msi   file.    
   
  You   may   also   include   a   brief   explanation   of   your   design   and   assumptions    
  along   with   your   code.    
   
  Please   email   your   completed   solution   to   CODE@THOUGHTWORKS.COM   and    
  JXIA@THOUGHTWORKS.COM   within   three   days.   To   expedite   proper   routing   of    
  your   code,   please   type   the   COUNTRY   of   the   ThoughtWorks   office   you   are    
  applying   to   (AUSTRALIA,   UK,   INDIA,   CHINA,   USA   or   CANADA)   in   the   Subject    
  Line   of   your   email.    
   
  As   a   general   rule,   we   allow   three   days   from   the   date   that   you   receive   this    
  letter   to   submit   your   code   to   CODE@THOUGHTWORKS.COM   ,   but   you   may   request    
  more   time   if   needed.   Since   we   may   use   your   code   as   an   interview   tool,    
  ThoughtWorks   reserves   the   right   to   postpone   your   technical   interview   if    
  your   code   is   not   received.   If   you   have   any   questions   about   the   code   as   it    
  relates   to   your   interview   process,   please   contact   us   at    
  CODE@THOUGHTWORKS.COM.    
   
  ThoughtWorks   would   like   the   opportunity   to   offer   you   a   challenging   career    
  with   our   dynamic   team.   We   wish   you   luck   and   look   forward   to   receiving   your    
  response.    
   
  Kind   Regards,    
   
   
  ThoughtWorks   Recruiting    
  CODE@THOUGHTWORKS.COM    
   
  ==========    
   
  INTRODUCTION   TO   THE   PROBLEMS    
   
  All   problems   below   require   some   kind   of   input.   You   are   free   to   implement    
  any   mechanism   for   feeding   input   into   your   solution   (for   example,   using   hard    
  coded   data   within   a   unit   test).   You   should   provide   sufficient   evidence    
  that   your   solution   is   complete   by,   as   a   minimum,   indicating   that   it   works    
  correctly   against   the   supplied   test   data.      
   
  PROBLEM   TWO:   SALES   TAXES    
   
  Basic   sales   tax   is   applicable   at   a   rate   of   10%   on   all   goods,   except   books,    
  food,   and   medical   products   that   are   exempt.   Import   duty   is   an   additional    
  sales   tax   applicable   on   all   imported   goods   at   a   rate   of   5%,   with   no    
  exemptions.    
   
  When   I   purchase   items   I   receive   a   receipt   which   lists   the   name   of   all   the    
  items   and   their   price   (including   tax),   finishing   with   the   total   cost   of   the    
  items,   and   the   total   amounts   of   sales   taxes   paid.   The   rounding   rules   for    
  sales   tax   are   that   for   a   tax   rate   of   n%,   a   shelf   price   of   p   contains    
  (np/100   rounded   up   to   the   nearest   0.05)   amount   of   sales   tax.    
   
  Write   an   application   that   prints   out   the   receipt   details   for   these   shopping    
  baskets...    
  INPUT:    
   
  Input   1:    
  1   book   at   12.49    
  1   music   CD   at   14.99    
  1   chocolate   bar   at   0.85    
   
  Input   2:    
  1   imported   box   of   chocolates   at   10.00    
  1   imported   bottle   of   perfume   at   47.50    
   
  Input   3:    
  1   imported   bottle   of   perfume   at   27.99    
  1   bottle   of   perfume   at   18.99    
  1   packet   of   headache   pills   at   9.75    
  1   box   of   imported   chocolates   at   11.25    
   
  OUTPUT    
   
  Output   1:    
  1   book   :   12.49    
  1   music   CD:   16.49    
  1   chocolate   bar:   0.85    
  Sales   Taxes:   1.50    
  Total:   29.83    
   
  Output   2:    
  1   imported   box   of   chocolates:   10.50    
  1   imported   bottle   of   perfume:   54.65    
  Sales   Taxes:   7.65    
  Total:   65.15    
   
  Output   3:    
  1   imported   bottle   of   perfume:   32.19    
  1   bottle   of   perfume:   20.89    
  1   packet   of   headache   pills:   9.75    
  1   imported   box   of   chocolates:   11.85    
  Sales   Taxes:   6.70    
  Total:   74.68    
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值