From 4602d99e31aebd22bfba6fec7dbf0f7a22147ba5 Mon Sep 17 00:00:00 2001 From: Alisa Dubina Date: Tue, 16 Sep 2025 11:50:59 -0400 Subject: [PATCH 1/3] task 1 fixed. --- .idea/.gitignore | 3 ++ .idea/misc.xml | 6 ++++ .idea/modules.xml | 8 +++++ .idea/vcs.xml | 6 ++++ README.md | 6 ++-- lab2-branching-and-merging.iml | 58 ++++++++++++++++++++++++++++++++++ src/DataTypes.java | 2 +- 7 files changed, 85 insertions(+), 4 deletions(-) create mode 100644 .idea/.gitignore create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml create mode 100644 lab2-branching-and-merging.iml diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 00000000..26d33521 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 00000000..dda71418 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 00000000..52b1a732 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 00000000..35eb1ddf --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/README.md b/README.md index 49ad8cf6..9ba1b6a1 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,7 +40,7 @@ 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. --- diff --git a/lab2-branching-and-merging.iml b/lab2-branching-and-merging.iml new file mode 100644 index 00000000..8aac2dfa --- /dev/null +++ b/lab2-branching-and-merging.iml @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ 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 fc92891b359774c5b4ce2276ef05ace8ae014f1d Mon Sep 17 00:00:00 2001 From: Alisa Dubina Date: Tue, 16 Sep 2025 11:51:39 -0400 Subject: [PATCH 2/3] TODO removed. --- 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 a87f8181327e7973b24cf761ccad540e7472264b Mon Sep 17 00:00:00 2001 From: Alisa Dubina Date: Tue, 16 Sep 2025 11:52:26 -0400 Subject: [PATCH 3/3] README updated --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9ba1b6a1..edbd929b 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ If you miss the lab and work on this after, you can use this URL though. --- -- [ ] 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.