Esempio n. 1
0
 public void addCircle() {
   String description = IO.getIO().readString("Description");
   double radius = IO.getIO().readDouble("Radius");
   Circle circle = new Circle(description, radius);
   IO.getIO().println(circle);
   figuresManager.add(circle);
 }
Esempio n. 2
0
 public void addSquare() {
   String description = IO.getIO().readString("Description");
   double side = IO.getIO().readDouble("Side");
   Square square = new Square(description, side);
   IO.getIO().println(square);
   figuresManager.add(square);
 }
Esempio n. 3
0
 public void addTriangle() {
   String description = IO.getIO().readString("Description");
   double base = IO.getIO().readDouble("Base");
   double height = IO.getIO().readDouble("Height");
   Triangle triangle = new Triangle(description, base, height);
   IO.getIO().println(triangle);
   figuresManager.add(triangle);
 }
Esempio n. 4
0
 @Override
 public void execute() {
   this.getCalculadora()
       .setTotal(
           this.getCalculadora()
               .getGm()
               .getMemento(
                   (String) IO.getIO().select(this.getCalculadora().getGm().keys(), "Restaurar"))
               .getValor());
 }
Esempio n. 5
0
 public void execute() {
   this.calculator.add(IO.getIO().readInt("How much to add?"));
 }
Esempio n. 6
0
 public static void main(String[] args) {
   IO.getIO().addView(new Main());
 }
Esempio n. 7
0
 public void numberOfSides() {
   IO.getIO().println(figuresManager.totalNumberOfSides());
 }
Esempio n. 8
0
 public void area() {
   IO.getIO().println(figuresManager.totalArea());
 }
Esempio n. 9
0
 public void execute() {
   String key = (String) IO.getIO().select(this.commandManager.keys());
   this.commandManager.execute(key);
 }