Assignment First, launch NetBeans and close any previous projects that may be open (at the top menu go to File ==> Close All Projects). Then create a new Java application called "Rooter" (without the quotation marks) that does the following: 1)  Gets a positive integer (i.e. any number greater than 0) called "start" from the user after outputting a meaningful prompt. 2)  Include data validation to ensure the user provides a positive integer.  If the validation is not passed, provide the user with suitable feedback and stay in the program to let the user try again until valid input is received.  3)  Uses a while loop that finds  and displays the square root of every number from "start" down through 0.        As an example, if the user entered 8, you would find the square root of 8, then the square root of 7, and so on. NOTES: Print each square root on a separate line. Use the Math.sqrt(double a) method to find each square root and output the result as a float using four decimal positions. Thoughts Refer to Horstmann chapter 2 for details on formatting output values. Include multiple runs of this program using a variety of values for the "start" variable. Be sure to test your input validation code as well. Copy and paste all of your sample runs in your source code as a block comment at the bottom below the closing curly brace.

Question

Assignment

First, launch NetBeans and close any previous projects that may be open (at the top menu go to File ==> Close All Projects).

Then create a new Java application called "Rooter" (without the quotation marks) that does the following:

1)  Gets a positive integer (i.e. any number greater than 0) called "start" from the user after outputting a meaningful prompt.

2)  Include data validation to ensure the user provides a positive integer.  If the validation is not passed, provide the user with suitable feedback and stay in the program to let the user try again until valid input is received. 

3)  Uses a while loop that finds  and displays the square root of every number from "start" down through 0.

       As an example, if the user entered 8, you would find the square root of 8, then the square root of 7, and so on.

NOTES: 
Print each square root on a separate line. 
Use the Math.sqrt(double a) method to find each square root and output the result as a float using four decimal positions.

Thoughts

Refer to Horstmann chapter 2 for details on formatting output values.

Include multiple runs of this program using a variety of values for the "start" variable. 
Be sure to test your input validation code as well. 
Copy and paste all of your sample runs in your source code as a block comment at the bottom below the closing curly brace.

Expert Answer

Want to see the step-by-step answer?

See Answer

Check out a sample Q&A here.

Want to see this answer and more?

Experts are waiting 24/7 to provide step-by-step solutions in as fast as 30 minutes!*

See Answer
*Response times vary by subject and question complexity. Median response time is 34 minutes and may be longer for new subjects.

Related Computer Science Q&A

Find answers to questions asked by student like you

Q: First, launch NetBeans and close any previous projects that may be open (at the top menu go to File ...

A: Create a JAVA file named IncomeTax.Ask the user to enter income and marital status.Based on marital ...

Q: Draw the truth tables for the following Boolean expressions. xy+yz+xz x¯y+yz¯+x¯z (x⊕y)+(y⊕z)+(x...

A: Hello. Since you have posted multiple questions and not specified which question needs to be solved,...

Q: Please Use JAVA to solve the problem

A: Create a java class “ArrayInv” and create a main method inside it.And declare a required variable to...

Q: Suppose you have two tables: EMPLOYEE and EMPLOYEE_1. The EMPLOYEE table contains the records for th...

A: Two tables are given named as EMPLOYEE and EMPLOYEE1. Each table has its records. EMPLOYEE table has...

Q: Write a simplified expression for the Boolean function defined by the following Kmap.

A: The given K-map gives the Boolean expression:= ~y + yz + xy

Q: Write a program (or modify the one written for Lab 2) that displays the following menu and prompts t...

A: Create a main method and declare all required variables (two variables for operations (+, -, *, /) a...

Q: c++ program to read file and output grades - file name is studentGrades.txt and the content is inclu...

A: Program Instructions:Comment the unused code and add necessary variables.Use a while and three inner...

Q: The class RoachPopulation simulates the growth of a roach population.The constructor takes the size ...

A: Program code #1:

Q: Consider the window size is 10, bandwidth is 1500 bps, transmission delay is 2 ms atpropagation dela...

A: Given information: