You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
//Shape shape = new Shape(); //da errore in comppilazione perchè Shape è abstract
Rectangle rettangolo = new Rectangle(8,4);
Square quadrato = new Square(22);
Circle cerchio = new Circle(20);
//TEST toString()
System.out.println(rettangolo.toString());
System.out.println(quadrato.toString());
System.out.println(cerchio.toString());
//TEST FUNZIONI set E toPrint()
rettangolo.fillOn().setColour("Orange");
rettangolo.setWidth(20).setLength(10);
rettangolo.scale(0.5);
rettangolo.draw();
quadrato.fillOn().setColour("Red");
quadrato.setSide(10);
rettangolo.scale(0.5);
quadrato.draw();
cerchio.fillOn().setColour("Green"); //Green non sarà considerato un colore valido, dunque stamperà errore (vedi setOfColours[] definito nella classe "Shape")