Loading ...
Sorry, an error occurred while loading the content.

Re: [XP] coffeehouse test-first challenge

Expand Messages
  • yahoogroups@jhrothjr.com
    ... From: Steve Howell To: extremeprogramming@yahoogroups.com
    Message 1 of 15 , Dec 1, 2003
    • 0 Attachment
      ----- Original Message -----
      From: "Steve Howell" <showell.at.zipcon.net@...>
      To: "extremeprogramming@yahoogroups.com"
      <extremeprogramming.at.yahoogroups.com@...>
      Sent: Monday, December 01, 2003 9:14 AM
      Subject: Re: [XP] coffeehouse test-first challenge


      > Steve Howell wrote:
      >
      > >yahoogroups@... wrote:
      > >
      > >
      > >
      > >>What happens if they switch to another item without entering all
      > >>of the options? Does the item get removed, is it pending so it can
      > >>be completed before the transaction ends, or what?
      > >>
      > >>
      > >>
      > >>
      > >>
      > >For the first iteration I'd like you to do whatever is simplest. (...)
      > >
      > John, have you made any progress on the FIT tests for the coffeehouse
      > problem? I know we got distracted with other threads.

      I've still just got the one test. I've been off on other things, including
      a couple of 3----c fiction stories under my usual (non-disclosed)
      pesudonym.

      Test follows: I'm inlining it (I hope it's inlined!) so that
      it will stay with the message.

      <html><head><title>Coffeehouse Acceptance Test 1</title></head>

      <body><h1>Coffee House Acceptance Test 1</h1>

      <p>This is Steve Howell's Coffee House exercise program. The requirements,
      cut, pasted and marked up from his e-mail describing it, follow</p>

      <p>Just in case you're sick of the bowling game, I'd like to pose another

      small problem. I will act as the customer. I need a touch-screen

      system for a coffeehouse. </p>

      <p>Here is the menu:

      <br>small coffee 1.00

      <br>medium coffee 1.25

      <br>large coffee 1.50

      <br>latte 3.00

      <br>turkey sandwich 5.00</p>

      <p>For the latte, you can get skim, decaf, whipped cream, no foam, or extra

      hot. You can add shots, too:

      <br>vanilla .25

      <br>hazelnut .25

      <br>caramel .25

      <br>espresso .50</p>

      <p>For the turkey sandwich, you can have focaccia, panini, or sourdough

      bread. Cheeses are american, cheddar, swiss, and provolone. You can

      grill it or have it cold.</p>

      </p>All options must be specified. It's possible to order a

      sandwich without bread or cheese, so there should be nobread

      and nocheese buttons.</p>

      <p>The base price needs to be shown immediately when the base

      item is entered.</p>

      <p>Order entry ends for an item when you start entering another

      item or elect to pay. Your GUI should always allow

      you to get to other places.</p>

      <p>Tax is 8.5%, any fraction of a cent always gets rounded up.</p>

      <p>The cashier should conclude the transaction by entering the amount

      received from the customer on the number pad and hitting the "CASH"
      button.</p>

      <p>The cashier should also have convenience buttons for the most logical

      payment options. For example, if the total's 13.87, you should see

      these buttons on the screen:

      <br>Exact Cash

      <br>$14

      <br>$15

      <br>$20</p>

      <p>When you hit one of the cash buttons, the screen should display the

      proper amount of change.</p>

      <p>If they get a turkey sandwich or a latte, a ticket should print, with

      all the options.</p>

      <p>I don't need a GUI implementation, but the implementation should be

      written with a touch-screen terminal eventually in mind. Touch screen

      usability is a firm, if not immediate, requirement.</p>

      <p>I am happy to break down stories or elaborate on any requirement.</p>

      <table BORDER CELLSPACING=0 CELLPADDING=3>

      <tr><td ColSpan=3>fit.ActionFixture</td></tr>

      <tr><td>start</td><td>CoffeeHouse1</td><td> </td></tr>

      <tr><td>press</td><td>turkey sandwich</td><td> </td></tr>

      <tr><td>press</td><td>panini</td><td> </td></tr>

      <tr><td>press</td><td>swiss</td><td> </td></tr>

      <tr><td>press</td><td>grill</td><td> </td></tr>

      <tr><td>check</td><td>item total</td><td>5.00</td></tr>

      <tr><td>check</td><td>subtotal</td><td>5.00</td></tr>

      <tr><td>check</td><td>tax</td><td>0.09</td></tr>

      <tr><td>check</td><td>total</td><td>5.09</td></tr>

      <tr><td>press</td><td>exact cash</td><td> </td></tr>

      </table>

      <p>At this point, there should be a way of checking that the ticket

      is printed correctly</p>

      </body></html>
    • Steve Howell
      ... Okay, no hurry. :) ... It looks like our test is slightly off. The tax on $5 should .085 * 5, which is $0.43.
      Message 2 of 15 , Dec 1, 2003
      • 0 Attachment
        yahoogroups@... wrote:

        >I've still just got the one test. I've been off on other things, including
        >a couple of 3----c fiction stories under my usual (non-disclosed)
        >pesudonym.
        >
        >
        Okay, no hurry. :)

        >(...)
        ><tr><td>check</td><td>item total</td><td>5.00</td></tr>
        >
        ><tr><td>check</td><td>subtotal</td><td>5.00</td></tr>
        >
        ><tr><td>check</td><td>tax</td><td>0.09</td></tr>
        >
        ><tr><td>check</td><td>total</td><td>5.09</td></tr>
        >
        >
        >

        It looks like our test is slightly off. The tax on $5 should .085 * 5,
        which is $0.43.
      • yahoogroups@jhrothjr.com
        From: Steve Howell Sent: Monday, December 01, 2003 11:09 PM Subject: Re: [XP] coffeehouse test-first
        Message 3 of 15 , Dec 2, 2003
        • 0 Attachment
          From: "Steve Howell" <showell.at.zipcon.net@...>
          Sent: Monday, December 01, 2003 11:09 PM
          Subject: Re: [XP] coffeehouse test-first challenge


          > yahoogroups@... wrote:
          >
          > >I've still just got the one test. I've been off on other things,
          including
          > >a couple of 3----c fiction stories under my usual (non-disclosed)
          > >pesudonym.
          > >
          > >
          > Okay, no hurry. :)
          >
          > >(...)
          > ><tr><td>check</td><td>item total</td><td>5.00</td></tr>
          > ><tr><td>check</td><td>subtotal</td><td>5.00</td></tr>
          > ><tr><td>check</td><td>tax</td><td>0.09</td></tr>
          > ><tr><td>check</td><td>total</td><td>5.09</td></tr>
          > >
          >
          > It looks like our test is slightly off. The tax on $5 should .085 * 5,
          > which is $0.43.

          Oops! You're right.

          John Roth
          >
          >
          > To Post a message, send it to: extremeprogramming@...
          >
          > To Unsubscribe, send a blank message to:
          extremeprogramming-unsubscribe@...
          >
          > ad-free courtesy of objectmentor.com
          >
          > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
          >
          >
        Your message has been successfully submitted and would be delivered to recipients shortly.