2. Given the following program: 10 import java.util.Scanner; 2 import java.lang. Math; 4 public class TutorialOne { public static void main(String[] args) { double a, aSqr, b, bSqr, c; 60 9. Scanner...


Identify the predefined methods used in Program 6.1 above, and state which import library contains the definition of each predefined methods


2.<br>Given the following program:<br>10 import java.util.Scanner;<br>2 import java.lang. Math;<br>4 public class TutorialOne {<br>public static void main(String[] args) {<br>double a, aSqr, b, bSqr, c;<br>60<br>9.<br>Scanner scan = new Scanner(System.in);<br>10<br>11<br>12<br>13<br>14<br>a = scan.nextDouble();<br>b = scan.nextDouble();<br>aSqr = Math.pow(a, 2.0);<br>bSqr = Math.pow(b, 2.0);<br>15<br>16<br>17<br>18<br>19<br>c = Math.sqrt(aSqr + bSqr);<br>System.out.println(

Extracted text: 2. Given the following program: 10 import java.util.Scanner; 2 import java.lang. Math; 4 public class TutorialOne { public static void main(String[] args) { double a, aSqr, b, bSqr, c; 60 9. Scanner scan = new Scanner(System.in); 10 11 12 13 14 a = scan.nextDouble(); b = scan.nextDouble(); aSqr = Math.pow(a, 2.0); bSqr = Math.pow(b, 2.0); 15 16 17 18 19 c = Math.sqrt(aSqr + bSqr); System.out.println("The length of hypotenous is " + c); } 20 21 22 } Figure 1: Program 6.1 a) Identify the predefined methods used in Program 6.1 above, and state which import library contains the definition of each predefined methods?

Jun 06, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here