From e57487f108c44cbb196a2324ca22d8617e387fad Mon Sep 17 00:00:00 2001 From: Jonathan Calver Date: Sun, 17 Sep 2023 12:47:41 -0400 Subject: [PATCH 1/7] Alice's version of the recipe added --- recipe.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/recipe.md b/recipe.md index a8b51a4d..c43eefce 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. From dafb6611c1aa15099729be2c26d23a525a4c6388 Mon Sep 17 00:00:00 2001 From: Jonathan Calver Date: Sun, 17 Sep 2023 12:48:41 -0400 Subject: [PATCH 2/7] Bob's version of the cake recipe added. --- recipe.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/recipe.md b/recipe.md index a8b51a4d..ea014023 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 flavor. +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. From 5d518ba42c818bd969a6ff18eed228c14dc87b64 Mon Sep 17 00:00:00 2001 From: BF10 Date: Mon, 18 Sep 2023 17:37:43 -0400 Subject: [PATCH 3/7] fixed the broken test and updated readme --- README.md | 6 +++--- src/DataTypes.java | 4 ++-- test/DataTypesTest.java | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 9e06d2e2..354ffcc0 100644 --- a/README.md +++ b/README.md @@ -24,18 +24,18 @@ can make pull requests to that repo during the Task 3 activity during the lab. During lab, you should not fork directly from https://github.com/CSC207-2023F-UofT/Lab2. If you miss the lab and work on this after, you should 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 some branches you will use 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 that you are now on the `task_1` branch. -- [ ] 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 completed items so far) and `DataTypes.java` (remove the word TODO and your bug fix). - talk to those around you or your TA, then see the hints at the bottom of the readme if you get stuck. diff --git a/src/DataTypes.java b/src/DataTypes.java index 4f807c1f..3f61a2a3 100644 --- a/src/DataTypes.java +++ b/src/DataTypes.java @@ -4,9 +4,9 @@ public class DataTypes { // TODO TASK 1: fix this code so that it passes the test in DataTypesTest.java public static long sum(List numbers) { - int s = 0; + long s = 0; // below is a "foreach" loop which iterates through numbers - for (int x : numbers) { + for (long x : numbers) { s += x; } return s; diff --git a/test/DataTypesTest.java b/test/DataTypesTest.java index e53951fe..03c395ea 100644 --- a/test/DataTypesTest.java +++ b/test/DataTypesTest.java @@ -24,6 +24,6 @@ public void largeSumTest() { for (int i = 1; i <= 1_000_000; i++) { lst.add(i); } - assertEquals("sum form 1 to 1 million should be " + x, x, DataTypes.sum(lst)); + assertEquals("sum from 1 to 1 million should be " + x, x, DataTypes.sum(lst)); } } \ No newline at end of file From 25b640bda8c5a0bbd262957ea7d948850863e78c Mon Sep 17 00:00:00 2001 From: BF10 Date: Mon, 18 Sep 2023 17:42:12 -0400 Subject: [PATCH 4/7] fixed the broken test and updated readme --- README.md | 4 ++-- src/DataTypes.java | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 354ffcc0..65829f6b 100644 --- a/README.md +++ b/README.md @@ -36,10 +36,10 @@ If you miss the lab and work on this after, you should use this URL though. - After, you can check `git status` or the Log tab of the Git tool window in IntelliJ to see that you are now on the `task_1` branch. - [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 those around you or your TA, then see the hints at the bottom of the readme if you get stuck. -- [ ] 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 checkout the main branch: - IntelliJ: `Git -> branches... -> main -> Checkout` diff --git a/src/DataTypes.java b/src/DataTypes.java index 3f61a2a3..b40f5fdb 100644 --- a/src/DataTypes.java +++ b/src/DataTypes.java @@ -1,7 +1,6 @@ import java.util.List; public class DataTypes { - // TODO TASK 1: fix this code so that it passes the test in DataTypesTest.java public static long sum(List numbers) { long s = 0; From 5286f0b9664a3122697ea245ef9498fddf04659a Mon Sep 17 00:00:00 2001 From: BF10 Date: Mon, 18 Sep 2023 17:46:27 -0400 Subject: [PATCH 5/7] finished merging the branch --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 65829f6b..48a968bd 100644 --- a/README.md +++ b/README.md @@ -45,17 +45,17 @@ branch: - IntelliJ: `Git -> branches... -> main -> Checkout` - Terminal: `git checkout main` Note: everything we've done has been local to our repository and have not pushed anything yet. -- [ ] 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` You should now see the changes you had made are also 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 (just right on main is fine; no need to branch for this little step), then push your code. Check GitHub to ensure you can see your changes. From afcbb1e5b592545587352308eed796a872c660ae Mon Sep 17 00:00:00 2001 From: BF10 Date: Mon, 18 Sep 2023 18:10:38 -0400 Subject: [PATCH 6/7] checking off the readme file --- README.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index a0417102..bdbcf15e 100644 --- a/README.md +++ b/README.md @@ -22,38 +22,38 @@ can make pull requests to that repo during the Task 3 activity during lab. During lab, you should not fork directly from TODO REPO URL. If you miss the lab and work on this after, please fork TODO REPO URL. -- [ ] 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 some branches you will use 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 that you are now on the `task_1` branch. -- [ ] 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] Open the TODO tool window (`View -> Tool Windows -> TODO`) and click on the TASK 1 TODO listed. +- [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 those around you or your TA, then see the hints at the bottom of the readme if you get stuck. -- [ ] 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 checkout the main branch: - IntelliJ: `Git -> branches... -> main -> Checkout` - Terminal: `git checkout main` Note: everything we've done has been local to our repository and have not pushed anything yet. -- [ ] 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` You should now see the changes you had made are also 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 (just right on main is fine; no need to branch for this little step), then push your code. Check GitHub to ensure you can see your changes. @@ -74,15 +74,15 @@ started working on the recipe in `recipe.md` together, and then each filled in t what they felt would make the most delicious cake! You'll notice that your repository already has two branches called `alice` and `bob`. -- [ ] Checkout the `alice` branch. -- [ ] Attempt to merge the `bob` branch into the `alice` branch using either IntelliJ or the Terminal. +- [X] Checkout the `alice` branch. +- [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 the merge process. - If you do the merge through the Terminal, you will need to edit `recipe.md` to remove all of the 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). From 7d31230a3f4a4ebe19f1d5ba9efbfc558550ee66 Mon Sep 17 00:00:00 2001 From: BF10 Date: Mon, 18 Sep 2023 18:18:43 -0400 Subject: [PATCH 7/7] making modifications to the recipe file and readme file --- README.md | 10 +++++----- recipe.md | 2 ++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 48a968bd..fdd79a00 100644 --- a/README.md +++ b/README.md @@ -76,23 +76,23 @@ started working on the recipe in `recipe.md` together, and then each filled in t what they felt would make the most delicious cake! You'll notice that your repository already has two branches called `alice` and `bob`. -- [ ] Checkout the `alice` branch. -- [ ] Attempt to merge the `bob` branch into the `alice` branch using either IntelliJ or the Terminal. +- [X] Checkout the `alice` branch. +- [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 the merge process. - If you do the merge through the Terminal, you will need to edit `recipe.md` to remove all of the 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! # 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 improve the recipe. - [ ] 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 diff --git a/recipe.md b/recipe.md index c43eefce..d33019c9 100644 --- a/recipe.md +++ b/recipe.md @@ -17,3 +17,5 @@ 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. + +some changes to the recipe from this branch \ No newline at end of file