Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program to compute the destination point (x and y) given the starting point (x and y), the distance, and the horizontal angle, Here

image text in transcribed

Write a program to compute the destination point (x and y) given the starting point (x and y), the distance, and the horizontal angle, Here are the formulas: a = b.7/180 dx = d.cos(a) dy=d. sin(a) x2 = x1 + dx y2 = yl + dy where b is the horizontal angle in degrees) a is the horizontal angle (in radians) d is the distance between the two points (in feet) dx.dy are the differences between the x and y coordinates, respectively (both in feet) xl,yl are the coordinates of the starting point (both in feet) x2,y2 are the coordinates of the destination point (both in feet) You will need to use the sine and cosine functions, "sin" and "cos" (in the Math class). Write a subprogram to do the calculations and compute the coordinates of the destination point (x2 and y2). The subprogram must return two numbers, so create a 'record' that combines the two into one unit. (Remember that a record is formed by a separate, external class with NO functions..) Then write a main program to ask the user for the inputs, call the subprogram, and then display the result. \ (To save time, you don't have to check for input errors.)

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

Data Management Databases And Organizations

Authors: Richard T. Watson

6th Edition

1943153035, 978-1943153039

More Books

Students also viewed these Databases questions

Question

How do Excel Pivot Tables handle data from non OLAP databases?

Answered: 1 week ago