This is for some home work i have in my java development class, we are supposed to create a shape calculator, consisting of a square, triangle, and circle while also displaying the radius and circumference of said shape once the user inputs what shape they want to see.
So far im having alot of trouble,the prompt for the homework asks for this "ask the user which shape they would like to work with".
Im not sure how to implement the feature in which the user would type the shape and java would recognize what was typed in and specifically target the shape that was typed in by the user and display its properties, i would assume it would utilize an else statement?
I've already figured how to display the string that prompts the user what shape they would like to use, but i can't find out how to specifically target said shape and have it display its radius and circumference.
package geometric;
import java.util.Scanner;
public class shapes {
public static void main(String[] args) {
Scanner scanner = new Scanner (System.in);
String shapeSelect = "Which Shape: Square Circle or Triangle?";
System.out.println(shapeSelect);
String Circle;
double circle;
circle = scanner.nextDouble();
System.out.println("enter the radius: ");
}
}