Question: in JAVA Complete the following skeleton code so that it can compute the circumference of a rect, square, or triangle. ================== import java.util.Scanner; public class

in JAVA Complete the following skeleton code so that it can compute the circumference of a rect, square, or triangle.

==================

import java.util.Scanner;

public class Question1x {

public static void main(String[] args) {

Scanner input = new Scanner(System.in);

// compute the circumference of a shape

// See sample output

System.out.println( "I can compute the circumference of one of the followings: Rect, Square, or Triangle " );

System.out.print( "Enter a shape: " );

String shape = input.nextLine().trim();

int circum = 0 ;

int side1, side2, side3;

// Your code here

System.out.println( "The circumference is : " + circum);

input.close();

}

}

=======================

The following is a sample output.

 in JAVA Complete the following skeleton code so that it can

Demo 10 [Java Application/Library/Java/Javavirtual Machines/jak-9.0.1.jdk/Contents/Home/bin/java (Jan 30, 2019, 1:25:29 PM) I can compute the circumference of one of the followings: Rect, Square, or Triangle Enter a shape: Rect Enter width: 10 Enter hieght: 20 The circumference is : 60 rupp y Serwisu. I can compute the circumference of one of the followings: Rect, Square, or Triangle Enter a shape: Square Enter side: 15 The circumference is : 60 uluu VTI IU UVU ULIVILIUI y uuvuvuvu v LUUVILION.U. JUULILOTI Ive Ivan wu, LUULUU I can compute the circumference of one of the followings: Rect, Square, or Triangle Enter a shape: Triangle Enter side1: 12 Enter side2: 13 Enter side3: 14 The circumference is : 39

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!