Question: Write a C++ program that uses a class called Degree to obtain the trigonometric values for angles given in degrees. This is because the trigonometric

Write a C++ program that uses a class called Degree to obtain the trigonometric values for angles given in degrees. This is because the trigonometric functions defined in the library file are applied to radian angles only. Use the constant DEG2RAD = 0.017453 for conversion from degrees to radians. This class must include a constructor, destructor, and the following functions: a. void set_value(double) b. double get_value() c. double get_sine() d. double get_cosine() e. double get_tangent() f. void read_value() Your main function should simply demonstrate the use of this class, i.e., prompt a user for an angle in degrees and display the sine, cosine and tangent of that angle.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!