Answered step by step
Verified Expert Solution
Question
1 Approved Answer
CHALLENGE 29.2: Tree height ACTIVITY Simple geometry can compute the height of an object from the object's shadow length and shadow angle using the formula
CHALLENGE 29.2: Tree height ACTIVITY Simple geometry can compute the height of an object from the object's shadow length and shadow angle using the formula tangent(angleElevation) = treeHeight / shadowength 1. Using simple algebra, rearrange that equation to solve for treeHeight. (Note: Don't forget tangent) 2. Complete the below code to compute treeHeight. For tangent, use the Math.tan method, described in the math methods link above (Notes) 1 import java.util.Scanner; 3 public class TreeHeight 4 public static void main(String [] args) f Scanner scnr new Scanner(System.in); double treeHeight; double shadowLength; double angleElevation; angleElevation-scnr.nextDouble) shadowLength -scnr.nextDouble) 10 12 14 16 Your solution goes here System.out.println (treeHeight); 17 Run
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started