/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */packagej;/** * * @author user */classCartel{privateFormaforma;privateStringtext;publicCartel(Formaforma,Stringtext){this.forma=forma;this.text=text;}publicvoidrellenarForma(){if(forma.cuadroFixText(this.text)){if(formainstanceofRectangulo){System.out.println("Rellenado completamente.");}else{System.out.println("Circulo rellenado.");}}else{System.out.println("No se pudo rellenar la forma, falta espacio");}}}