p1-recipes
EECS 183 Project 1: Vanilla Cupcakes — Student Quickstart
Full specification (all details + sample runs): Full Spec
This page is a shorter, student-first version of the full spec. It keeps every requirement, but organizes them for faster onboarding.
Note: you will need to use the details in the full specification to complete the project.
0) Logistics (Dates, Grading, Submissions)
Due date: Friday, September 18, 2026 at 8:00 p.m. Eastern (accepted for full credit until 11:59 p.m.)
Autograder: Direct autograder link
Early bonus (autograder score):
- Last submission before Wednesday, September 16 at 11:59 p.m.: +5%
- Last submission before Thursday, September 17 at 11:59 p.m.: +2.5%
Grading:
- 60 points correctness (immediate feedback in the autograder)
- 10 points style (human graded after the due date)
Submissions:
- 4 submissions per day; your best overall submission counts as your score
- You have 3 late days for the whole semester (not 3 per project) — details in the syllabus
1) Big Picture (What You’re Building)
One program, in one file (cupcakes.cpp), that:
- Asks the user how many people they need to serve
- Computes the number of batches of cupcakes (each person eats 1 cupcake; each batch makes 12 — no partial batches, round up)
- Prints a shopping list: whole packages of each ingredient (round up)
- Prints the total expected cost of the ingredients
- Matches the output template exactly, including correct pluralization
2) Files You’re Given
Download the starter files using this link.
| File | Purpose | You Edit? | You Submit? |
|---|---|---|---|
cupcakes.cpp |
your whole program (main() plus a provided pluralize() helper) |
Yes | Yes |
pluralize(singular, plural, number) is already implemented for you — use it to print “1 batch” vs. “2 batches”, “1 bag” vs. “3 bags”, and so on.
Add your name, uniqname, program name, and a project description to the header comment at the top of cupcakes.cpp.
3) Key Numbers (Recipe, Packages, Costs)
Each batch needs the ingredients for both the cupcakes and the vanilla buttercream frosting. Combined per-batch amounts:
| Ingredient | Per batch (cupcakes + frosting) | Sold as | Cost | Conversion |
|---|---|---|---|---|
| Flour | 1 ½ cups | 5 lb bag | $4.29 | 18 cups per bag |
| Granulated sugar | 1 cup | 4 lb bag | $3.19 | 9 cups per bag |
| Butter | 1 ½ cups (½ + 1) | 1 lb | $3.49 | 2 cups per pound |
| Sour cream | ½ cup | 8 oz container | $1.39 | 1 cup per container |
| Eggs | 3 (1 whole + 2 for yolks) | dozen | $1.39 | 12 per dozen |
| Powdered sugar | 2 ½ cups | 2 lb bag | $2.09 | 5 ½ cups per bag |
| Vanilla extract | 4 ½ tsp (1 ½ + 1 tbsp) | 2 oz bottle | $7.89 | 12 tsp per bottle |
| Baking powder, salt | 1 ½ tsp, ½ tsp | — | free | pantry supply — not in shopping list or total cost |
Full details: Specification
Rules:
- You must make a whole number of batches and buy a whole number of packages — round up. Use the
ceil()function with double division to do this; see the worked example in the full spec. - Put these numbers in named constants; literals like
18in a formula are magic numbers and violate the style guide.
4) Exact Output Rules (Very Important)
Your output must match the template exactly — spelling, capitalization, and symbols. The autograder ignores whitespace differences, but nothing else. Use a diffchecker like diffchecker.com to compare your output against the sample runs; humans are bad at spotting the differences.
Template (red parts change per run):
How many people do you need to serve?
You need to make: 5 batches of cupcakes
Shopping List for "Best Ever" Vanilla Cupcakes
----------------------------------------------
1 bag of flour
1 bag of granulated sugar
4 pounds of butter
3 containers of sour cream
2 dozen eggs
3 bags of powdered sugar
2 bottles of vanilla
Total expected cost of ingredients: $50.44
Have a great party!
Notes:
- Pluralization must be correct everywhere (
1 batch/2 batches,1 bag/3 bags, …) — usepluralize(). - The plural of “dozen” is still “dozen”:
2 dozen eggs, not2 dozens eggs. - Trailing zeros in the cost are dropped (
$330.6, not$330.60;$10, not$10.00). Defaultcoutsettings do this for you — don’t fight it.
Check yourself against all five runs: Sample Runs
5) The Development Cycle (How to Work)
Build one small part at a time, and only move on when it is 100% correct. For each part:
- Make examples of input and correct output
- Find the pattern linking input to output (guess, then check against your examples)
- Write the C++ code
- Test your code against your examples
The full spec walks through this cycle twice — computing batches, then bags of flour: Development cycle and Your turn: bags of flour
6) Suggested Order of Work
Full details: Roadmap and Timeline
- Compute number of batches (with correct “batch”/”batches” output)
- Compute bags of flour (with correct pluralization); repeat for all ingredients
- Compute cost of flour; add to total; repeat for all ingredients
- Add header and footer messages
- Diff your output against every sample run; debug
- Check the style guide and style rubric
- Submit to the autograder; debug what it reveals
Submit as soon as you pass one sample run — the autograder can find problems your computer doesn’t show, and working locally does not guarantee working on the autograder.
7) Collaboration
Allowed collaboration:
- Help understanding course concepts
- Discuss the spec and design ideas
- Help debug or interpret compiler errors
Not allowed:
- Copying or deriving code from others
- Sharing your code in any form (public or private)
- Collaborating so solutions are identifiably similar
- Receiving help that tells you what to write
If unsure, ask course staff first. Full policy: Collaboration Policy
8) Style Reminders
Full details: Style Guide and Project 1 Style Rubric
- Top comment with name, uniqname, program name, and description
- No magic numbers — use
constvariables inSNAKE_CASE - No non-const global variables
- Call
pluralize()where appropriate (not chains ofif (batches == 1) ... else if (batches == 2) ...) - Descriptive, consistently-named variables (
camelCaseorsnake_case, not both) - Consistent brace style; braces on all conditionals, loops, and functions
- 80 characters per line max; one statement per line
- Comment before the line, not at the end of it
9) Timeline (Fall 2026)
| Date | Suggested milestone |
|---|---|
| Sep 8 | IDE ready; project created with the starter code |
| Sep 9 | Batches and bags of flour working; one more ingredient and its cost working |
| Sep 11 | All ingredients added; passes sample runs; score above 0 on autograder |
| Sep 14 | Debugging in progress; passes all sample runs; 80% or higher on autograder |
| Sep 16 | Last day for 5% bonus |
| Sep 17 | Last day for 2.5% bonus |
| Sep 18, 2026 | Final due |
10) Fast Start Checklist
- Download and unzip the starter files; create a project (IDE setup tutorials)
- Add your name/uniqname to the header comment
- Compute batches; test with 1, 2, 12, 13, and 0 people
- Add each ingredient one at a time, testing as you go
- Add costs, header, and footer
- Diff against all five sample runs
- Submit early and often — the file must be named
cupcakes.cpp(How to Submit)
11) How to Get Help
Most students need help from staff multiple times each project. We’re here for you!
- Spec questions: Piazza is fastest
- 1-1 help: Office Hours