You are on page 1of 3

SCIENTIFIC CALCULATOR

STATEMENT

Mathematics is used for solving problems in engineering, such as the calculation of


eigenvalues for principal component analysis in data analytics; the calculation of
the Fourier transform for signal processing; the calculation of the downward
gradient for model optimization; the least squares update, for the estimation of a
position in a GPS system (Kalman Filter).

It is for that reason that programming languages have implemented different


mathematical functions, from the calculation of the power of a number to the
calculation of the cosine function.

For this integrative assignment you will implement from scratch, in Java language,
two relatively simple operations:

The natural logarithm defined as:

And the sine function defined as:

Input-outputs
Inputs=int option, double num.
Outputs= double result, String message.

EXAMPLES

1.
 Inputs: option=1, num= 3
 Outputs: message = number out of range.
2.
 Inputs: option=2, num= 40
 Outputs: message = number out of range.
3.
 Inputs: option=2, num= 15
 Outputs: result=0.65028784014082.
4.
 Inputs: option=1, num= 0,5
 Outputs: result= 0.6931471805599451
5.
 Inputs: option=15
 Outputs: message: The selected option is unavailable, please select a valid
option

DIAGRAM

You might also like