Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pull request task 3 #11

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
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
16 changes: 13 additions & 3 deletions recipe.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,19 @@
- 2 cups all-purpose flour
- 1 3/4 cups granulated sugar
- 3/4 cup unsweetened cocoa powder
- ...
- 1/2 tsp ground cinnamon
- 1 cup chocolate chips
- 1 tsp vanilla extract

## 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,ground cinnamon, chocolate chips, and vanilla extract.
3. ...

## Additional Directions:
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.
7. In a separate bowl, beat the eggs and add them to the mixture. Stir until well combined.
8. Gradually add the milk and vegetable oil to the mixture, continuing to stir.
9. Pour the batter into a greased and floured 9x13-inch baking pan.
6 changes: 2 additions & 4 deletions src/DataTypes.java
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
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) {
for (int x: numbers) {
s += x;
}
return s;
Expand Down
1 change: 1 addition & 0 deletions test/DataTypesTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,4 @@ public void largeSumTest() {
assertEquals("sum from 1 to 1 million should be " + x, x, DataTypes.sum(lst));
}
}