Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

93 changes: 93 additions & 0 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions Lab2.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module-library" scope="TEST">
<library name="JUnit4">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/junit/junit/4.13.1/junit-4.13.1.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
</component>
</module>
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,19 @@ 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.
- [ ] 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,
Expand Down Expand Up @@ -76,24 +76,24 @@ 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 improve the recipe.
- [x] Checkout a new branch called `task_3`.
- [x] 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
a pull request and see that it shows up in the original repository that you forked.
Expand Down
25 changes: 22 additions & 3 deletions recipe.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,28 @@
- 2 cups all-purpose flour
- 1 3/4 cups granulated sugar
- 3/4 cup unsweetened cocoa powder
- ...
# alice
- 1 cup chocolate chips
- 1 tsp vanilla extract
# bob
- 1/2 tsp ground cinnamon
- add some protein powder

## Instructions:
1. Preheat the oven to 350°F (175°C).
2. In a large bowl, whisk together the flour, sugar, and cocoa powder.
3. ...
2. In a large bowl, whisk together the flour, sugar, cocoa powder, chocolate chips, and vanilla extract.
# bob
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. add some protein powder

## 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.


## 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.
3 changes: 1 addition & 2 deletions src/DataTypes.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
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<Integer> numbers) {

int s = 0;
long s = 0;
// below is a "foreach" loop which iterates through numbers
for (int x : numbers) {
s += x;
Expand Down