From 06f5aefc4a5b2226c01f91597092febd94fca160 Mon Sep 17 00:00:00 2001 From: Jonathan Calver Date: Fri, 12 Sep 2025 18:36:32 -0400 Subject: [PATCH 1/7] adding alice's recipe! --- recipe.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/recipe.md b/recipe.md index a8b51a4d..8e62e2a7 100644 --- a/recipe.md +++ b/recipe.md @@ -4,9 +4,16 @@ - 2 cups all-purpose flour - 1 3/4 cups granulated sugar - 3/4 cup unsweetened cocoa powder +- 1 cup chocolate chips +- 1 tsp vanilla extract - ... ## Instructions: 1. Preheat the oven to 350°F (175°C). -2. In a large bowl, whisk together the flour, sugar, and cocoa powder. -3. ... \ No newline at end of file +2. In a large bowl, whisk together the flour, sugar, cocoa powder, chocolate chips, and vanilla extract. +3. ... + +## Additional Directions by Alice: +4. In a separate bowl, beat the eggs and add them to the mixture. Stir until well combined. +5. Gradually add the milk and vegetable oil to the mixture, continuing to stir. +6. Pour the batter into a greased and floured 9x13-inch baking pan. \ No newline at end of file From a3329a0ee7654668ad26ad27f2f3fb7347ef50c9 Mon Sep 17 00:00:00 2001 From: Jonathan Calver Date: Fri, 12 Sep 2025 18:37:44 -0400 Subject: [PATCH 2/7] adding bob's recipe! --- recipe.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/recipe.md b/recipe.md index a8b51a4d..f3a050e1 100644 --- a/recipe.md +++ b/recipe.md @@ -4,9 +4,15 @@ - 2 cups all-purpose flour - 1 3/4 cups granulated sugar - 3/4 cup unsweetened cocoa powder +- 1/2 tsp ground cinnamon - ... ## Instructions: -1. Preheat the oven to 350°F (175°C). -2. In a large bowl, whisk together the flour, sugar, and cocoa powder. -3. ... \ No newline at end of file +1. Preheat the oven to 375°F (190°C). +2. In a large bowl, whisk together the flour, sugar, cocoa powder, and ground cinnamon. +3. ... + +## Additional Directions by Bob: +4. Add a tablespoon of instant coffee to the dry ingredients for a hint of mocha flavour. +5. Mix in a handful of chocolate chunks for extra indulgence. +6. Line the bottom of the baking pan with parchment paper for easy cake removal. \ No newline at end of file From 0eb9e6d3d3bc89b087255382726c354ee086944b Mon Sep 17 00:00:00 2001 From: andrewpols Date: Tue, 16 Sep 2025 11:47:21 -0400 Subject: [PATCH 3/7] Complete Task 1 --- .gitignore | 2 ++ README.md | 8 +++---- lab2-branching-and-merging.iml | 41 ++++++++++++++++++++++++++++++++++ src/DataTypes.java | 2 +- 4 files changed, 48 insertions(+), 5 deletions(-) create mode 100644 lab2-branching-and-merging.iml diff --git a/.gitignore b/.gitignore index f68d1099..86cf6485 100644 --- a/.gitignore +++ b/.gitignore @@ -22,6 +22,8 @@ bin/ /nbdist/ /.nb-gradle/ +.idea + ### VS Code ### .vscode/ diff --git a/README.md b/README.md index 49ad8cf6..b7d2ec95 100644 --- a/README.md +++ b/README.md @@ -25,14 +25,14 @@ Your TA will share a different URL for you to fork from, so that you can make pull requests to that repo during Task 3 of the lab. If you miss the lab and work on this after, you can use this URL though. -- [ ] Make a fork of this repo and clone a local copy (as you did in Lab 1). +- [x] Make a fork of this repo and clone a local copy (as you did in Lab 1). >**Important**: make sure to uncheck the option to only fork the main branch, as the repo > contains two branches you will use later in this lab. # TASK 1: Your first branch -- [ ] Create and checkout a new branch called `task_1` using either IntelliJ or the Terminal: +- [x] Create and checkout a new branch called `task_1` using either IntelliJ or the Terminal: - IntelliJ: `Git -> New branch...` - Terminal: `git checkout -b task_1` - After, you can check `git status` or the Log tab of the Git tool window in IntelliJ to see @@ -40,11 +40,11 @@ If you miss the lab and work on this after, you can use this URL though. --- -- [ ] Open the TODO tool window (`View -> Tool Windows -> TODO`) and click on the TASK 1 TODO listed. +- [x] Open the TODO tool window (`View -> Tool Windows -> TODO`) and click on the TASK 1 TODO listed. --- -- [ ] Complete the TASK 1 TODO and commit your changes to this file (checking off the +- [x] Complete the TASK 1 TODO and commit your changes to this file (checking off the completed items so far) and `DataTypes.java` (remove the word TODO and your bug fix). - talk to your team or your TA, then see the hints at the bottom of the readme if you get stuck. diff --git a/lab2-branching-and-merging.iml b/lab2-branching-and-merging.iml new file mode 100644 index 00000000..4888ed0b --- /dev/null +++ b/lab2-branching-and-merging.iml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/DataTypes.java b/src/DataTypes.java index 12c0618e..66c0dc4d 100644 --- a/src/DataTypes.java +++ b/src/DataTypes.java @@ -1,7 +1,7 @@ public class DataTypes { // TODO TASK 1: fix this code so that it passes the test in DataTypesTest.java public static long sum(int[] numbers) { - int s = 0; // variable to accumulate the sum in! + long s = 0; // variable to accumulate the sum in! // below is a "foreach" loop which iterates through numbers for (int x : numbers) { s += x; From 7b9497d9ac2032a8d35b42ec62076cfd6b27bff2 Mon Sep 17 00:00:00 2001 From: andrewpols Date: Tue, 16 Sep 2025 11:50:29 -0400 Subject: [PATCH 4/7] check off README.md tasks --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index b7d2ec95..78caacc5 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ completed items so far) and `DataTypes.java` (remove the word TODO and your bug --- -- [ ] Now, we'll merge the `task_1` branch back into `main`. When merging, +- [x] Now, we'll merge the `task_1` branch back into `main`. When merging, you need to be currently on the branch you are trying to merge into, so we'll first check out the main branch: - IntelliJ: `Git -> branches... -> main -> Checkout` @@ -59,7 +59,7 @@ branch: --- -- [ ] We are back on `main`, so we can now do the merge and complete our work! +- [x] We are back on `main`, so we can now do the merge and complete our work! - IntelliJ: `Git -> Merge... -> task_1 -> Merge` - Terminal: `git merge task_1` @@ -67,13 +67,13 @@ You should now see the changes that you made are now in the `main` branch. --- -- [ ] Now, we'll want to clean up since we are done with our `task_1` branch. +- [x] Now, we'll want to clean up since we are done with our `task_1` branch. - IntelliJ: `Git -> branches... -> task_1 -> Delete` - Terminal: `git branch -d task_1` --- -- [ ] Last step! We'll push our changes to the remote repository to share our work! (As we did in Lab 1.) +- [x] Last step! We'll push our changes to the remote repository to share our work! (As we did in Lab 1.) - we suggest you check off this last item, commit that change, and then push your code. Check GitHub to ensure you can see your changes. From a96f662df5b57d1a319a43e9116a51f3b154465a Mon Sep 17 00:00:00 2001 From: andrewpols Date: Tue, 16 Sep 2025 11:51:36 -0400 Subject: [PATCH 5/7] Remove TODO tag --- src/DataTypes.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/DataTypes.java b/src/DataTypes.java index 66c0dc4d..1c1adc7f 100644 --- a/src/DataTypes.java +++ b/src/DataTypes.java @@ -1,5 +1,4 @@ public class DataTypes { - // TODO TASK 1: fix this code so that it passes the test in DataTypesTest.java public static long sum(int[] numbers) { long s = 0; // variable to accumulate the sum in! // below is a "foreach" loop which iterates through numbers From 47a350429f4f8fea199aeb470ae4b571dd9ada10 Mon Sep 17 00:00:00 2001 From: andrewpols Date: Tue, 16 Sep 2025 12:15:38 -0400 Subject: [PATCH 6/7] check off README tasks --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index ca4cb1aa..a7292063 100644 --- a/README.md +++ b/README.md @@ -97,9 +97,9 @@ on their own branch. You'll notice that your repository already has two branches called `alice` and `bob`. -- [ ] Checkout the `alice` branch. +- [x] Checkout the `alice` branch. -- [ ] Attempt to merge the `bob` branch into the `alice` branch using either IntelliJ or the Terminal. +- [x] Attempt to merge the `bob` branch into the `alice` branch using either IntelliJ or the Terminal. - You will be prompted to resolve a merge conflict. To do this, you will need to pick and choose which parts of each recipe to keep. - Read what either `git` or `IntelliJ` tells you in order to complete ge process. @@ -107,9 +107,9 @@ You'll notice that your repository already has two branches called `alice` and ` merge conflict symbols which `git` has added to your file. Once done, you will need to `git add` the `recipe.md` file and `git commit` to finish the merge. -- [ ] Once the merge is complete, delete the `bob` branch. +- [x] Once the merge is complete, delete the `bob` branch. -- [ ] Finally, checkout the `main` branch and merge the `alice` branch in (as we did previously). +- [x] Finally, checkout the `main` branch and merge the `alice` branch in (as we did previously). Now, you are almost ready to share your recipe with the remote! From ef61ef57deba92f616c457502a5db0f7418072eb Mon Sep 17 00:00:00 2001 From: andrewpols Date: Tue, 16 Sep 2025 12:25:41 -0400 Subject: [PATCH 7/7] add sea salt to recipe --- README.md | 8 ++++---- recipe.md | 25 ++++++++----------------- 2 files changed, 12 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 749de042..bcade70d 100644 --- a/README.md +++ b/README.md @@ -115,13 +115,13 @@ Now, you are almost ready to share your recipe with the remote! # TASK 3 -- [ ] Checkout a new branch called `task_3`. +- [x] Checkout a new branch called `task_3`. -- [ ] Commit any changes that you want to `recipe.md` to further improve the recipe. +- [x] Commit any changes that you want to `recipe.md` to further improve the recipe. -- [ ] **While still on the `task_3` branch**, push your code to your remote repository on GitHub. +- [x] **While still on the `task_3` branch**, push your code to your remote repository on GitHub. -- [ ] Go to GitHub and you will see an option to make a pull request to the original repo. Make +- [x] Go to GitHub and you will see an option to make a pull request to the original repo. Make a pull request and see that the PR shows up in the original repository that you forked. Since others will also be making pull requests, we won't *actually* accept any of them for now, but diff --git a/recipe.md b/recipe.md index 2daeb643..3f21da14 100644 --- a/recipe.md +++ b/recipe.md @@ -4,29 +4,20 @@ - 2 cups all-purpose flour - 1 3/4 cups granulated sugar - 3/4 cup unsweetened cocoa powder - -## Alice Ingredients - 1 cup chocolate chips - 1 tsp vanilla extract - -## Bob Ingredients - 1/2 tsp ground cinnamon -## Alice Instructions: + +## Instructions: 1. Preheat the oven to 350°F (175°C). 2. In a large bowl, whisk together the flour, sugar, cocoa powder, chocolate chips, and vanilla extract. -## Bob Instructions -1. Preheat the oven to 375°F (190°C). -2. In a large bowl, whisk together the flour, sugar, cocoa powder, and ground cinnamon. - - -## Additional Directions by Alice: +## Additional Directions: 3. In a separate bowl, beat the eggs and add them to the mixture. Stir until well combined. 4. Gradually add the milk and vegetable oil to the mixture, continuing to stir. -5. Pour the batter into a greased and floured 9x13-inch baking pan. - -## Additional Directions by Bob: -3. Add a tablespoon of instant coffee to the dry ingredients for a hint of mocha flavour. -4. Mix in a handful of chocolate chunks for extra indulgence. -5. Line the bottom of the baking pan with parchment paper for easy cake removal. \ No newline at end of file +5. Add a tablespoon of instant coffee to the dry ingredients for a hint of mocha flavour. +6. Mix in a handful of chocolate chunks for extra indulgence. +7. Line the bottom of the baking pan with parchment paper for easy cake removal. +8. Pour the batter into a greased and floured 9x13-inch baking pan. +9. Sprinkle sea salt flakes on top of the batter. \ No newline at end of file