This assignment will consist of fourand only four methods


Grading criteria:
Using while loops
Using iteration
Using if and else
Using good cohesion
Avoid chaining
Avoid coupling

Assignment:
This assignment will consist of fourand only four methods including the main. In addition to the main method, the program shall consist of one method for input, one method for output and one method for calculations. The program you write will calculate the square root of the input value.

Requirements
Main method
Shall be used for flow control only.

Other methods
shall prompt the user for single floating point value greater than 1.0.
Shall limit the input to floating point values greater than 1.0.
Shall notify the user if the input value does not meet the input criteria without invoking an exception.
Shall allow the user to retry by inputting a correct value.
Shall calculate the square root of the input value WITHOUT using the MATH library or any MATH functions or methods
Shall calculate the square root of the input value WITHOUT using any form of Newton's method
Shall terminate with a sentinel value of -999.9
Shall use only these math operators: +, -, /, *.
Shall output the user provided value along with the square root of that value.
Shall output the results to 4 decimal places.
Shall calculate the square root to be within 0.0001 of the exact answer.

Output Example
Your output should look something like the following example, but it will have different numeric values (based on your input)

Please select a floating point number greater than 1.0 => 100.0
Results input ==> 100.0000 square root ==> 10.0000
Please select a floating point number greater than 1.0 => -999.9
Program exiting.

Solution Preview :

Prepared by a verified Expert
JAVA Programming: This assignment will consist of fourand only four methods
Reference No:- TGS02386437

Now Priced at $10 (50% Discount)

Recommended (95%)

Rated (4.7/5)