From 2aa0158b0b1cd9c777f2b1d1bc640b0257f58d01 Mon Sep 17 00:00:00 2001 From: lauraz25 Date: Mon, 18 Sep 2023 19:40:28 -0400 Subject: [PATCH 1/2] fixed bug --- src/DataTypes.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/DataTypes.java b/src/DataTypes.java index 4f807c1f..3f5aad55 100644 --- a/src/DataTypes.java +++ b/src/DataTypes.java @@ -1,10 +1,11 @@ +import java.util.ArrayList; 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) { - int s = 0; + long s = 0; // below is a "foreach" loop which iterates through numbers for (int x : numbers) { s += x; From 566e0e57690e4ec17eb6c1d0397a3856019140a4 Mon Sep 17 00:00:00 2001 From: lauraz25 Date: Mon, 18 Sep 2023 19:49:26 -0400 Subject: [PATCH 2/2] update progress --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4b438d6c..d6f477d3 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ 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.