import java.util.Scanner; import java.util.Scanner; public class Carteles implements CartelesInterface{ String texto; Carteles(String T){ texto=t; } public static void main(String[] args) { Scanner scanner=new Scanner(System.in); System.out.println("Ingrese el texto que desea imprimir en el cartel:"); String texto=scanner.nextLine(); System.out.println("Ingrese la forma que desea utilizar para su cartel"); System.out.println("1-circulo\n2-rectangulo"); int a=scanner.nextInt(); if(a==1){ System.out.println("ingrese el radio:"); int d=scanner.nextInt(); System.out.println("ingrese el color:"); String c=scanner.nextLine(); Circulos C=new Circulos(d,c); if(C.cartelesCirculos(texto)){ System.out.println("el cartel se podra hacer"); }else{ System.out.println("el cartel no se podra hacer, el texto excede al radio"); } }else{ System.out.println("Ingrese la anchura:"); int d=scanner.nextInt(); System.out.println("Ingrese la altura:"); int b=scanner.nextInt(); System.out.println("ingrese el color:"); String c=scanner.nextLine(); Rectangulos R=new Rectangulos(d,b,c); if(R.cartelesRectangulo(texto)){ System.out.println("el cartel se podra hacer"); }else{ System.out.println("el cartel no se podra hacer, el texto excede a la longitud"); } } } }