Question: java for task 3 , creating methods, create or copy from another application the table with sample data, hand - calculated results, and computer results.
java for task creating methods, create or copy from another application the table with sample data, handcalculated results, and computer results. referring to this code: choice keyboard.nextInt;
switchchoice
case :
System.out.printEnter the radius of "the circle: ;
radius keyboard.nextDouble;
TASK # Call the circleArea method
store the result in the value variable
System.out.printlnThe circumference of the circle is value;
break;
case :
System.out.printEnter the length of "the rectangle: ;
length keyboard.nextDouble;
System.out.printEnter the width of "the rectangle: ;
width keyboard.nextDouble;
TASK # Call the rectangleArea method and
store the result in the value variable
System.out.printlnThe area of the "rectangle is value;
break;
case :
System.out.printEnter the height of "the triangle: ;
height keyboard.nextDouble;
System.out.printEnter the base of "the triangle: ;
base keyboard.nextDouble;
TASK # Call the triangleArea method and
store the result in the value variable
System.out.printlnThe area of the "triangle is value;
break;
case :
System.out.printEnter the radius of "the circle: ;
radius keyboard.nextDouble;
TASK # Call the circumference method and
store the result in the value variable
System.out.printlnThe volume of the "sphere is value;
break;
case :
System.out.printEnter the length of "the rectangle: ;
length keyboard.nextDouble;
System.out.printEnter the width of "the rectangle: ;
width keyboard.nextDouble;
TASK # Call the perimeter method and
store the result in the value variable
System.out.printlnThe perimeter of "the rectangle is value;
break;
case :
System.out.printEnter the length of "side of the "triangle: ;
side keyboard.nextDouble;
System.out.printEnter the length of "side of the "triangle: ;
side keyboard.nextDouble;
System.out.printEnter the length of "side of the "triangle: ;
side keyboard.nextDouble;
TASK # Call the perimeter method and
store the result in the value variable
System.out.printlnThe perieter of the triangle is value;
break;
default:
System.out.printlnYou did not enter
"a valid choice.";
keyboard.nextLine; Consume the new line
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
