Skip to content

Commit 5e4f7ca

Browse files
committed
Add Heron's Formula link
1 parent 2f1ffcb commit 5e4f7ca

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/com/codefortomorrow/intermediate/chapter11/practice/Triangle.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ public static double area(double side1, double side2, double side3)
1313
Write a test program that reads three sides for a triangle
1414
and computes the area if the sides form a valid triangle.
1515
Otherwise, it displays that the input is invalid.
16-
Use Heron's Formula to calculate the area of a triangle given 3 sides.
16+
Use Heron's Formula to calculate the area of a triangle given 3 sides:
17+
https://www.mathsisfun.com/geometry/herons-formula.html
1718
1819
Adapted from Exercise 6.19, Introduction to Java Programming (Comprehensive),
1920
10th ed. by Y. Daniel Liang

src/com/codefortomorrow/intermediate/chapter11/solutions/Triangle.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ public static double area(double side1, double side2, double side3)
1515
Write a test program that reads three sides for a triangle
1616
and computes the area if the sides form a valid triangle.
1717
Otherwise, it displays that the input is invalid.
18-
Use Heron's Formula to calculate the area of a triangle given 3 sides.
18+
Use Heron's Formula to calculate the area of a triangle given 3 sides:
19+
https://www.mathsisfun.com/geometry/herons-formula.html
1920
2021
Adapted from Exercise 6.19, Introduction to Java Programming (Comprehensive),
2122
10th ed. by Y. Daniel Liang

0 commit comments

Comments
 (0)