Execute the internal loop of the method

Assignment Help JAVA Programming
Reference no: EM131591480

Assignment:

This assignment will consist of three methods in addition to the main method. Class name is: Roots

Method names are: roots
You may not substitute other names. You must use the names provided above.

Requirements

Main method

1. Shall prompt the user using a print or println to input a single integer value.

2. Shall use a Scanner object to input a single integer value.

3. Shall call the "roots" method with the single int value provided by the Scanner.
First method (roots)

4. Shall have only one formal int parameter.

5. Shall have a void return type.

6. The parameter shall determine how many times to execute the internal loop of the method. Within the loop the method:
6.1. Shall prompt and input two integer values.
6.2. Shall use a Scanner object to input two integer values when prompted.
6.3. Shall print your name on one line.
6.4. Shall call the second "roots" method from inside of the print statement of "6.3". 6.5. Shall pass the second "roots" method the two input integer values as parameters.
6.6. Shall print the result of the call to the second roots method on the next line after the
requirement in "6.3."
6.7. Note : Only two lines will be printed for each iteration of this loop (from this method).
Second method (roots)

7. Shall have two formal int parameters.

8. Shall have a double return type.

9. Shall cast the two int parameters as doubles and pass to the third "roots" method.

10. The return value from the third "roots" method shall be printed on a single line. (from this method)

11. Shall compute and return the square root of the sum of the squares of the two int parameters ( Calculations to be performed in floating point). Algebraically it would look like this, (a^2 + b^2)^1/2
12. Note: you will need to use the Math package to compute the square root
Third method (roots)

12. Shall have two formal double parameters.

13. Shall have a double return type.

14. Shall compute and print the first parameter times 3 on one line. Ex: (first * 3.0)

15. Shall compute and return the result of the following computation:
    15.1. First parameter times 100.0 with the result divided by 3 times the second parameter. Algebraically it looks like:

       15.1.1. (first * 100.0) /(second * 3) Output Example

Your output should look like the following example, but it will have different numeric values (based on your input) and of course your name, not mine. If you follow the requirements strictly, you get the same results:

Enter a single integer value =>
2
Please enter two integer values =>
3 4 9.0 25.0
Don Phanco
5.0
Please enter two integer values =>
6 8,
18.0
25.0
Don Phanco

Reference no: EM131591480

Questions Cloud

Define instructional design : Define instructional design and describe its purpose. can it be more than 100 words please. References are required.
Understanding of how the human resource function : The objective of this assessment is to demonstrate your understanding of how the human resource function interacts with other functions in the organization.
Discuss the three faces of leadership : Critically discuss the relevance of the above perspective in the contemporary organisational context. Support your discussion with ideas from relevant theories.
Does the nature of the business itself : Does the nature of the business itself (the services provided) impact the location of the expansion (regional, national, global)? Why or why not?
Execute the internal loop of the method : The parameter shall determine how many times to execute the internal loop of the method. Within the loop the method
What is the monthly return on this investment vehicle : What is the monthly return on this investment vehicle? What is the effective annual return?
Create an imaginary profile of a family of four members : Create an imaginary profile of a family of three to four members providing details such as sex, age, health status, nutritional status, and medications.
Calculate the mean absolute deviation : Project - In a workbook for Eller Software Services, you calculate deviation statistics for sales by product and city
After-the-fact project evaluation : What are the major purposes served by an after-the-fact project evaluation?

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