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

coffeehouse test-first challenge

Expand Messages
  • Steve Howell
    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
    Message 1 of 15 , Nov 24, 2003
    • 0 Attachment
      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.

      Here is the menu:


      small coffee 1.00
      medium coffee 1.25
      large coffee 1.50
      latte 3.00
      turkey sandwich 5.00

      For the latte, you can get skim, decaf, whipped cream, no foam, or extra
      hot. You can add shots, too:

      vanilla .25
      hazelnut .25
      caramel .25
      espresso .50

      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.

      Tax is 8.5%, and it always gets rounded up.

      The cashier should conclude the transaction by entering the amount
      received from the customer on the number pad and hitting the "CASH" button.

      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:

      Exact Cash
      $14
      $15
      $20

      When you hit one of the cash buttons, the screen should display the
      proper amount of change.

      If they get a turkey sandwich or a latte, a ticket should print, with
      all the options.

      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.

      I am happy to break down stories or elaborate on any requirement.
    • Brian Christopher Robinson
      ... Can we get some acceptance tests? Seriously, though. There is a lot of variability here. Specifically in how input is handled. Presumably on a touch
      Message 2 of 15 , Nov 24, 2003
      • 0 Attachment
        On Mon, 24 Nov 2003, Steve Howell wrote:

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

        Can we get some acceptance tests?

        Seriously, though. There is a lot of variability here. Specifically in
        how input is handled. Presumably on a touch screen there will be
        buttons of some kind. Maybe an acceptance test could take in a file
        of commands that correspond to a button press like:

        sandwich
        cold
        provolone
        $15

        etc.

        Also, what output do you want? Once someone orders an item, what do you
        want to happen? The only implied output I see in your description is
        showing the cashier how much change to give out. Or is that it?

        --
        Without requirements, the program is done now. - Ron Jeffries
      • yahoogroups@jhrothjr.com
        Small? Let s see. No ticket for coffee only? Tax rounding. Any fraction goes to next cent, or only fractions of .5 or larger? Sounds like a job for the FIT
        Message 3 of 15 , Nov 24, 2003
        • 0 Attachment
          Small?

          Let's see.

          No ticket for coffee only?
          Tax rounding. Any fraction goes to next cent,
          or only fractions of .5 or larger?

          Sounds like a job for the FIT Action Fixture.

          John Roth


          From: "Steve Howell" <showell.at.zipcon.net@...>
          Sent: Monday, November 24, 2003 2:31 PM
          Subject: [XP] coffeehouse test-first challenge


          > 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.
          >
          > Here is the menu:
          >
          >
          > small coffee 1.00
          > medium coffee 1.25
          > large coffee 1.50
          > latte 3.00
          > turkey sandwich 5.00
          >
          > For the latte, you can get skim, decaf, whipped cream, no foam, or extra
          > hot. You can add shots, too:
          >
          > vanilla .25
          > hazelnut .25
          > caramel .25
          > espresso .50
          >
          > 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.
          >
          > Tax is 8.5%, and it always gets rounded up.
          >
          > The cashier should conclude the transaction by entering the amount
          > received from the customer on the number pad and hitting the "CASH"
          button.
          >
          > 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:
          >
          > Exact Cash
          > $14
          > $15
          > $20
          >
          > When you hit one of the cash buttons, the screen should display the
          > proper amount of change.
          >
          > If they get a turkey sandwich or a latte, a ticket should print, with
          > all the options.
          >
          > 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.
          >
          > I am happy to break down stories or elaborate on any requirement.
          >
          >
          >
          >
          >
          >
          > 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/
          >
          >
        • Steve Howell
          ... Those are exactly what I had in mind, but I forgot that I would be the one writing them. :) So here goes.... small coffee (1.09 shows on running total, $2,
          Message 4 of 15 , Nov 24, 2003
          • 0 Attachment
            Brian Christopher Robinson wrote:

            >On Mon, 24 Nov 2003, Steve Howell wrote:
            >
            >
            >
            >>I am happy to break down stories or elaborate on any requirement.
            >>
            >>
            >
            >Can we get some acceptance tests?
            >
            >Seriously, though. There is a lot of variability here. Specifically in
            >how input is handled. Presumably on a touch screen there will be
            >buttons of some kind. Maybe an acceptance test could take in a file
            >of commands that correspond to a button press like:
            >
            >sandwich
            >cold
            >provolone
            >$15
            >
            >etc.
            >
            >

            Those are exactly what I had in mind, but I forgot that I would be the
            one writing them. :)

            So here goes....

            small coffee
            (1.09 shows on running total, $2, $5, $10, $20)
            small coffee
            (2.17 shows on running total, $3, $5, $10, $20)
            $3
            (.83 shows as change, no ticket)

            latte
            (options screen shows)
            (3.26 shows on running total, $4, $5, $10, $20)
            vanilla
            (new prices)
            exact cash
            (door opens, ticket says latte w/vanilla)

            >Also, what output do you want? Once someone orders an item, what do you
            >want to happen? The only implied output I see in your description is
            >showing the cashier how much change to give out. Or is that it?
            >
            >
            >
            I should always be able to see the items ordered so far, the price so
            far, and the price so far with tax.

            The tickets can be really simple, just the drink/sandwich, then every
            option on a single line.

            Assume that you can fit about 20 buttons on the screen, along with a
            little listbox that shows the items, and the prices.
          • Steve Howell
            ... Well, maybe not as small as the bowling game, but I can limit scope for the first iteration, if you help me prioritize. ... Correct. I just pour it on the
            Message 5 of 15 , Nov 24, 2003
            • 0 Attachment
              yahoogroups@... wrote:

              >Small?
              >
              >
              Well, maybe not as small as the bowling game, but I can limit scope for
              the first iteration, if you help me prioritize.

              >Let's see.
              >
              >No ticket for coffee only?
              >
              Correct. I just pour it on the spot. But you made me think of another
              requirement. Some one may get a turkey sandwich AND a latte. In that
              case I need two tickets to print--one for the barista, and one for the
              sandwich guy. The printer driver has a command to rip the paper halfway
              while you're printing; that's how you separate the tickets.

              >Tax rounding. Any fraction goes to next cent,
              >or only fractions of .5 or larger?
              >
              >
              Always round up.

              >Sounds like a job for the FIT Action Fixture.
              >
              >
              >
              We'll see. :)
            • yahoogroups@jhrothjr.com
              ... From: Steve Howell To: extremeprogramming@yahoogroups.com
              Message 6 of 15 , Nov 24, 2003
              • 0 Attachment
                ----- Original Message -----
                From: "Steve Howell" <showell.at.zipcon.net@...>
                To: "extremeprogramming@yahoogroups.com"
                <extremeprogramming.at.yahoogroups.com@...>
                Sent: Monday, November 24, 2003 3:21 PM
                Subject: Re: [XP] coffeehouse test-first challenge


                > yahoogroups@... wrote:
                >
                > >Small?
                > >
                > >
                > Well, maybe not as small as the bowling game, but I can limit scope for
                > the first iteration, if you help me prioritize.
                >
                > >Let's see.
                > >
                > >No ticket for coffee only?
                > >
                > Correct. I just pour it on the spot. But you made me think of another
                > requirement. Some one may get a turkey sandwich AND a latte. In that
                > case I need two tickets to print--one for the barista, and one for the
                > sandwich guy. The printer driver has a command to rip the paper halfway
                > while you're printing; that's how you separate the tickets.
                >
                > >Tax rounding. Any fraction goes to next cent,
                > >or only fractions of .5 or larger?
                > >
                > >
                > Always round up.

                I don't understand the semantics of the phrase:
                "round up." Does it mean that you round any
                fractional remainder to the next cent, or only
                if the fractional remainder is 1/2 cent or greater?

                John Roth
              • Steve Howell
                ... There are three strategies for rounding. You can always round up, you can always round down, or you can round to the nearest cent. Rounding to the
                Message 7 of 15 , Nov 24, 2003
                • 0 Attachment
                  yahoogroups@... wrote:

                  >I don't understand the semantics of the phrase:
                  >"round up." Does it mean that you round any
                  >fractional remainder to the next cent, or only
                  >if the fractional remainder is 1/2 cent or greater?
                  >
                  >
                  >
                  There are three strategies for rounding. You can always round up, you
                  can always round down, or you can round to the nearest cent. Rounding
                  to the nearest cent is the place where the 1/2-cent-or-greater rules
                  comes into play.

                  But I don't want that.

                  Always round up, please.
                • yahoogroups@jhrothjr.com
                  From: Steve Howell Sent: Monday, November 24, 2003 11:14 PM Subject: Re: [XP] coffeehouse test-first
                  Message 8 of 15 , Nov 25, 2003
                  • 0 Attachment
                    From: "Steve Howell" <showell.at.zipcon.net@...>
                    Sent: Monday, November 24, 2003 11:14 PM
                    Subject: Re: [XP] coffeehouse test-first challenge


                    > yahoogroups@... wrote:
                    >
                    > >I don't understand the semantics of the phrase:
                    > >"round up." Does it mean that you round any
                    > >fractional remainder to the next cent, or only
                    > >if the fractional remainder is 1/2 cent or greater?
                    > >
                    > >
                    > >
                    > There are three strategies for rounding. You can always round up, you
                    > can always round down, or you can round to the nearest cent. Rounding
                    > to the nearest cent is the place where the 1/2-cent-or-greater rules
                    > comes into play.
                    >
                    > But I don't want that.
                    >
                    > Always round up, please.

                    OK. I've changed my copy of the requirements to be a bit
                    more specific. Now since I've created the first FIT test, I've
                    got a couple of questions.

                    1. On the turkey sandwich, do all three options have to
                    be specified, or are there defaults.

                    2. On both products, is the unit price shown immediately
                    when the base product (turkey sandwich) is pressed, or
                    does it wait until all the options are specified. If so, how
                    do we know that all of the options have been specified?

                    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/
                    >
                    >
                  • Steve Howell
                    ... Excellent question. No defaults. They must specify every option. Also, occasionally you ll get customers that don t want any bread, believe it or not,
                    Message 9 of 15 , Nov 25, 2003
                    • 0 Attachment
                      yahoogroups@... wrote:

                      >OK. I've changed my copy of the requirements to be a bit
                      >more specific. Now since I've created the first FIT test, I've
                      >got a couple of questions.
                      >
                      >1. On the turkey sandwich, do all three options have to
                      >be specified, or are there defaults.
                      >
                      >
                      Excellent question. No defaults. They must specify every option.
                      Also, occasionally you'll get customers that don't want any bread,
                      believe it or not, and you definitely get cheese avoiders.

                      >2. On both products, is the unit price shown immediately
                      >when the base product (turkey sandwich) is pressed, or
                      >does it wait until all the options are specified. If so, how
                      >do we know that all of the options have been specified?
                      >
                      >
                      >
                      Another good question. Show the base price immediately. All the
                      options are specified when you either a) start ordering something that's
                      not a turkey sandwich, or b) elect to pay. Your GUI should always allow
                      you to get to other places.
                    • yahoogroups@jhrothjr.com
                      From: Steve Howell Sent: Tuesday, November 25, 2003 6:13 PM Subject: Re: [XP] coffeehouse test-first
                      Message 10 of 15 , Nov 25, 2003
                      • 0 Attachment
                        From: "Steve Howell" <showell.at.zipcon.net@...>
                        Sent: Tuesday, November 25, 2003 6:13 PM
                        Subject: Re: [XP] coffeehouse test-first challenge


                        > yahoogroups@... wrote:
                        >
                        > >2. On both products, is the unit price shown immediately
                        > >when the base product (turkey sandwich) is pressed, or
                        > >does it wait until all the options are specified. If so, how
                        > >do we know that all of the options have been specified?
                        > >
                        > >
                        > >
                        > Another good question. Show the base price immediately. All the
                        > options are specified when you either a) start ordering something that's
                        > not a turkey sandwich, or b) elect to pay. Your GUI should always allow
                        > you to get to other places.

                        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?

                        John Roth
                      • Steve Howell
                        ... For the first iteration I d like you to do whatever is simplest. You bring up a pretty important requirement, because this sometimes happens: I ll have a
                        Message 11 of 15 , Nov 25, 2003
                        • 0 Attachment
                          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. You
                          bring up a pretty important requirement, because this sometimes happens:

                          "I'll have a turkey sandwich on panini with swiss."

                          "We're out of swiss."

                          "Okay, I don't need cheese then. But give me a cup of coffee with that."

                          (from the back) "I just sliced some more swiss."

                          "Okay, give me swiss then."

                          What you normally do in this situation is void the coffee, add the
                          swiss, then put the coffee back. We don't have voids yet, but that's
                          ok; we'll work around this scenario if you can just get us a simple
                          system up and running.
                        • Steve Howell
                          ... John, have you made any progress on the FIT tests for the coffeehouse problem? I know we got distracted with other threads.
                          Message 12 of 15 , Dec 1, 2003
                          • 0 Attachment
                            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.
                          • yahoogroups@jhrothjr.com
                            ... From: Steve Howell To: extremeprogramming@yahoogroups.com
                            Message 13 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 14 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 15 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.