From a012334b485354836e040e123824b9fa2bfd089c Mon Sep 17 00:00:00 2001 From: Shuxiao Date: Mon, 16 Sep 2024 22:23:21 +0800 Subject: [PATCH 1/8] Task 1 --- README.md | 4 ++-- src/DataTypes.java | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index ae0a61a0..381ce048 100644 --- a/README.md +++ b/README.md @@ -32,12 +32,12 @@ If you miss the lab and work on this after, you should use this URL though. # 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..b0c9ca27 100644 --- a/src/DataTypes.java +++ b/src/DataTypes.java @@ -1,12 +1,12 @@ import java.util.List; public class DataTypes { - // TODO TASK 1: fix this code so that it passes the test in DataTypesTest.java + // 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; From ff0be9fe859135fba146964ed915efd7d54526a7 Mon Sep 17 00:00:00 2001 From: Shuxiao Date: Mon, 16 Sep 2024 22:26:45 +0800 Subject: [PATCH 2/8] Task 1 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 381ce048..35346caf 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ 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, From 115e871811a8747e7c3bcbc2a4f02fd6b280cac1 Mon Sep 17 00:00:00 2001 From: Shuxiao Date: Mon, 16 Sep 2024 22:31:21 +0800 Subject: [PATCH 3/8] Task 1 --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 35346caf..7a39bc5c 100644 --- a/README.md +++ b/README.md @@ -41,23 +41,23 @@ If you miss the lab and work on this after, you should use this URL though. - [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 the main branch is fine; no need to branch for this little step), then push your code. Check GitHub to ensure you can see your changes. From 7110856c383f5179ae9921670f766d68e9277180 Mon Sep 17 00:00:00 2001 From: Shuxiao Date: Mon, 16 Sep 2024 22:38:48 +0800 Subject: [PATCH 4/8] Task 3 --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 7a39bc5c..d6cf0364 100644 --- a/README.md +++ b/README.md @@ -78,7 +78,7 @@ 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. +- [X] Checkout the `alice` branch. - [ ] 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. @@ -86,16 +86,16 @@ You'll notice that your repository already has two branches called `alice` and ` - 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`. -- [ ] Commit any changes that you want to `recipe.md` to further improve the recipe. +- [X] Checkout a new branch called `task_3`. +- [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. - [ ] 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 it shows up in the original repository that you forked. From eeca3ccc861c32afc36720334713948d80b93afe Mon Sep 17 00:00:00 2001 From: Shuxiao Date: Mon, 16 Sep 2024 22:39:12 +0800 Subject: [PATCH 5/8] Task 3 --- README.md | 2 +- recipe.md | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d6cf0364..0a7da244 100644 --- a/README.md +++ b/README.md @@ -96,7 +96,7 @@ Now, you are almost ready to share your recipe with the remote! - [X] Checkout a new branch called `task_3`. - [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 a pull request and see that it shows up in the original repository that you forked. diff --git a/recipe.md b/recipe.md index 804ee453..44d7fc78 100644 --- a/recipe.md +++ b/recipe.md @@ -24,3 +24,5 @@ 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. + +## Additional Direction for task 3 From efbf4b27563b3b855f3211bdf6e7e02aab77f993 Mon Sep 17 00:00:00 2001 From: Shuxiao Date: Mon, 16 Sep 2024 22:44:36 +0800 Subject: [PATCH 6/8] Task 3 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0a7da244..357fa27b 100644 --- a/README.md +++ b/README.md @@ -97,7 +97,7 @@ Now, you are almost ready to share your recipe with the remote! - [X] Checkout a new branch called `task_3`. - [X] Commit any changes that you want to `recipe.md` to further improve the recipe. - [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 it 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 From 1039da5d5962bbc4f3abc993af577fd537513feb Mon Sep 17 00:00:00 2001 From: Shuxiao Date: Mon, 16 Sep 2024 22:46:58 +0800 Subject: [PATCH 7/8] Task 3 --- recipe.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/recipe.md b/recipe.md index 44d7fc78..86755bd3 100644 --- a/recipe.md +++ b/recipe.md @@ -25,4 +25,5 @@ 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. -## Additional Direction for task 3 +## Additional Direction for task 3: +7. ??? From 3ef43a6255623ddc73c8fe0e8f0b986d402d5a69 Mon Sep 17 00:00:00 2001 From: Shuxiao Date: Mon, 16 Sep 2024 22:49:02 +0800 Subject: [PATCH 8/8] Task 3 --- recipe.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe.md b/recipe.md index 86755bd3..94cb7477 100644 --- a/recipe.md +++ b/recipe.md @@ -26,4 +26,4 @@ 6. Line the bottom of the baking pan with parchment paper for easy cake removal. ## Additional Direction for task 3: -7. ??? +7. ????