Calculate the square root of the input value

Assignment Help JAVA Programming
Reference no: EM131590895

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.

Reference no: EM131590895

Questions Cloud

Discuss how the thickness of ethanol or aqueous film : Discuss how the thickness of ethanol or aqueous film forming foams can be changed. Does the foam have a higher or lower molecular weight
Should discounted cash flow be used : Sure Fire Company manufacture a variety of products in four plants located in Sydney. Should discounted cash flow be used in this outsourcing decision? Why
Summarize your overall action plan : In one or two sentences, summarize your overall Action Plan and how it will address the problem of Bias in the Workplace.
Conduct research for specific items in jerry falwell library : Conduct research for specific items in the Jerry Falwell Library. Access information legally and ethically, using discipline-specific practices for citation.
Calculate the square root of the input value : 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,
Discuss the process of habitual marijuana addiction : Discuss the distinction between marijuana, amphetamines, and other types of drugs. Discuss the process of habitual marijuana addiction
Sexual orientation-gender identity : Choose a trait or behavior and state whether you believe it is influenced most strongly by nature or nurture.
How should mask account for the stock dividend : How should Mask account for the stock dividend, and how would it affect the stockholders' equity at December 31, 2017? Why
Upthrust of an object which is immersed in a fluid : State two measurements you would take in an experiment to determine the upthrust of an object which is immersed in a fluid.

Reviews

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd