Project 10 of 20, for Caitlin
Order Book
Caitlin's bake sale stock numbers change on their own. Find out why, then build the order book that never touches the standing orders.
Sign up free to open itLog in
Act 2 needs a free account, so your work is saved as you go. Act 1 is open to everyone.
The brief
- CaitlinI run a bake sale on Fridays and Saturdays to raise money for new board games for the Studio.
- CaitlinSaturday's sheet said we'd sold thirty-five loaves by nine, and we'd only been open ten minutes.
- CaitlinI wrote the stock program last term and I've counted three times, but it's still wrong.
- PaulHmm, numbers don't move on their own. I reckon something else is holding the same box.
Caitlin's stock program keeps a sheet for each day of the bake sale. Find out why one day's sales turn up on the next day's sheet, and fix it.
Then write saturday_orders(standing, extras) for the bake sale's standing orders. It returns Saturday's orders, the standing orders with this week's extras added, and leaves both of its arguments exactly as they were.
bread: 35 left of 40 buns: 60 left of 60 brownies: 12 left of 12
What you learn
What's in it
- Labels on boxes
- Two labels, one box
- What can change
- Numbers and trays
- The same, or the same one
- Same, or the same one
- How deep a copy goes
- How deep is a copy
- Reading Caitlin's stock sheets
- Fix the stock sheets
- How Paul would do it
- Fix Riya's version
- Make Saturday's orders
- Ship it