diff --git a/.idea/.gitignore b/.idea/.gitignore
new file mode 100644
index 00000000..13566b81
--- /dev/null
+++ b/.idea/.gitignore
@@ -0,0 +1,8 @@
+# Default ignored files
+/shelf/
+/workspace.xml
+# Editor-based HTTP Client requests
+/httpRequests/
+# Datasource local storage ignored files
+/dataSources/
+/dataSources.local.xml
diff --git a/.idea/checkstyle-idea.xml b/.idea/checkstyle-idea.xml
new file mode 100644
index 00000000..7f3d96d0
--- /dev/null
+++ b/.idea/checkstyle-idea.xml
@@ -0,0 +1,15 @@
+
+
+
+ 10.18.0
+ JavaOnly
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
new file mode 100644
index 00000000..635cac6e
--- /dev/null
+++ b/.idea/inspectionProfiles/Project_Default.xml
@@ -0,0 +1,221 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 00000000..7c4c609e
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,292 @@
+
+
+
+
+
+
+
+ Abstraction issuesJava
+
+
+ AnnotationsGroovy
+
+
+ Async code and promisesJavaScript and TypeScript
+
+
+ Bean Validation
+
+
+ Checkstyle
+
+
+ ClassNaming conventionsJava
+
+
+ Code maturityJava
+
+
+ Code style issuesJava
+
+
+ CodeSpring CoreSpring
+
+
+ Compiler issuesJava
+
+
+ Control flow issuesGroovy
+
+
+ Control flow issuesJava
+
+
+ Control flow issuesJavaScript and TypeScript
+
+
+ Data flowJava
+
+
+ Declaration redundancyJava
+
+
+ Dockerfile
+
+
+ ES2015 migration aidsJavaScript and TypeScript
+
+
+ EmbeddedPerformanceJava
+
+
+ Error handlingJava
+
+
+ General
+
+
+ GeneralJavaScript and TypeScript
+
+
+ Gradle
+
+
+ GradleMigrationKotlin
+
+
+ Groovy
+
+
+ HTTP Client
+
+
+ Imports and dependenciesJavaScript and TypeScript
+
+
+ ImportsJava
+
+
+ Inappropriate gRPC request scheme
+
+
+ InitializationJava
+
+
+ InternationalizationJava
+
+
+ JPA
+
+
+ JUnit
+
+
+ JVM languages
+
+
+ Java
+
+
+ Java 14Java language level migration aidsJava
+
+
+ Java 15Java language level migration aidsJava
+
+
+ Java 16Java language level migration aidsJava
+
+
+ Java 21Java language level migration aidsJava
+
+
+ Java 7Java language level migration aidsJava
+
+
+ Java 8Java language level migration aidsJava
+
+
+ Java EE
+
+
+ Java language level issuesJava
+
+
+ Java language level migration aidsJava
+
+
+ JavaScript and TypeScript
+
+
+ Kotlin
+
+
+ LoggingJVM languages
+
+
+ LoggingJava
+
+
+ Maven
+
+
+ MethodNaming conventionsJava
+
+
+ Micronaut
+
+
+ MicronautMicronaut
+
+
+ MigrationKotlin
+
+
+ MongoJS
+
+
+ MySQL
+
+
+ Naming conventionsJava
+
+
+ Numeric issuesJava
+
+
+ Other problemsKotlin
+
+
+ PerformanceJava
+
+
+ Probable bugsGradle
+
+
+ Probable bugsGroovy
+
+
+ Probable bugsJava
+
+
+ Probable bugsKotlin
+
+
+ Proofreading
+
+
+ Resource managementJava
+
+
+ SQL
+
+
+ Security
+
+
+ SecurityJava
+
+
+ SecurityJavaScript and TypeScript
+
+
+ Serialization issuesJava
+
+
+ Shell script
+
+
+ Spring
+
+
+ Spring AOPSpring
+
+
+ Spring BootSpring
+
+
+ Spring Cloud StreamSpring
+
+
+ Spring CoreSpring
+
+
+ Spring DataSpring
+
+
+ Spring IntegrationSpring
+
+
+ Spring MVCSpring
+
+
+ Spring SecuritySpring
+
+
+ Style issuesKotlin
+
+
+ StyleGradle
+
+
+ Switch statement issuesJavaScript and TypeScript
+
+
+ Threading issuesGroovy
+
+
+ Threading issuesJava
+
+
+ Try statement issuesJavaScript and TypeScript
+
+
+ Validity issuesGradle
+
+
+ Validity issuesJavaScript and TypeScript
+
+
+ Verbose or redundant code constructsJava
+
+
+ Version control
+
+
+ XPath
+
+
+ toString() issuesJava
+
+
+
+
+ User defined
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 00000000..dd47d373
--- /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/Lab2.iml b/Lab2.iml
new file mode 100644
index 00000000..03a7b649
--- /dev/null
+++ b/Lab2.iml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/README.md b/README.md
index 8207214b..77e9d0aa 100644
--- a/README.md
+++ b/README.md
@@ -24,38 +24,38 @@ 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-2024F-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 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
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 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.
@@ -76,26 +76,26 @@ 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`.
-- [ ] 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
+- [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
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
diff --git a/recipe.md b/recipe.md
index a8b51a4d..3036495f 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
+- 1 cup cream cheese frosting
## 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.
diff --git a/src/DataTypes.java b/src/DataTypes.java
index 4f807c1f..b0d65abd 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) {
int s = 0;
diff --git a/test/DataTypesTest.java b/test/DataTypesTest.java
index 42b9ef96..bcf9cbe4 100644
--- a/test/DataTypesTest.java
+++ b/test/DataTypesTest.java
@@ -27,4 +27,4 @@ public void largeSumTest() {
}
assertEquals("sum from 1 to 1 million should be " + x, x, DataTypes.sum(lst));
}
-}
+}
\ No newline at end of file