Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.

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. 1. Using simple algebra, rearrange that equation to solve for treeHeight. 2. Write a statement to assign treeHeight with the height calculated from an expression using angleElevation and shadowLength.

code:

import java.util.Scanner; 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 shadowLength = 17.5;

/* Your solution goes here */

System.out.print("Tree height: "); System.out.println(treeHeight);

return; } }

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Online Market Research Cost Effective Searching Of The Internet And Online Databases

Authors: John F. Lescher

1st Edition

0201489295, 978-0201489293

More Books

Students also viewed these Databases questions