Question: Simple geometry can compute the height of an object from the object's shadow length and shadow angle using the formula: tan(angleElevation) = treeHeight/shadowLength. Using simple

Simple geometry can compute the height of an object from the object's shadow length and shadow angle using the formula: tan(angleElevation) = treeHeight/shadowLength. Using simple algebra, rearrange that equation to solve for treeHeight. Write a statement to assign treeHeight with the height calculated from an expression using angleElevation and shadowLength. import java.lang.Math: public class TreeHeight { public static void main(String args) { double treeHeight = 0.0: double shadowLength = 0.0: double angleElevation = 0.0: angleElevation = 0.11693706: // 0. 11693706 radians = 6.7 degrees shadowLength17.5: treeHeight Math.tanh(angleElevation) * shadowLength: System.out.print("Tree height: "): System.out.println (treeHeight): return: } } Testing with shadowLength = 17.5, angleElevation = 0.11693706 Your output 2.0371216159798458 Expected output 2.05578
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
