diff --git a/README.md b/README.md index c8575ae..6019f21 100644 --- a/README.md +++ b/README.md @@ -37,8 +37,23 @@ AƱadir otros tipos de conversiones, ejm. temperatura ## Proyecto - - [ ] Releases -- [ ] [Conversor](./target/Conversor.jar).jar en desarrollo - - [ ] Imagenes - - [ ] Videos - - [ ] [Javadocs](https://devfzn.github.io/Desafio_Conversor/overview-tree.html) +- [ ] Releases +- [ ] [Conversor](./target/Conversor.jar).jar en desarrollo +- [ ] Imagenes + - [x] Version CLI + - [x] Version TUI + - [ ] Version GUI +- [ ] Video +- [ ] [Javadocs](https://devfzn.github.io/Desafio_Conversor/overview-tree.html) + +### Conversor de Monedas CLI + + + + +### Conversor de Monedas TUI + + + + +### Conversor de monedas GUI diff --git a/docs/allclasses-index.html b/docs/allclasses-index.html index 6e5d2f9..ef63036 100644 --- a/docs/allclasses-index.html +++ b/docs/allclasses-index.html @@ -1,11 +1,11 @@ - + All Classes and Interfaces - + diff --git a/docs/allpackages-index.html b/docs/allpackages-index.html index c443ec4..7628726 100644 --- a/docs/allpackages-index.html +++ b/docs/allpackages-index.html @@ -1,11 +1,11 @@ - + All Packages - + diff --git a/docs/conversor_alura_one/cl/conversor/app/Conversor.html b/docs/conversor_alura_one/cl/conversor/app/Conversor.html index c6606a7..7adf2d9 100644 --- a/docs/conversor_alura_one/cl/conversor/app/Conversor.html +++ b/docs/conversor_alura_one/cl/conversor/app/Conversor.html @@ -1,11 +1,11 @@ - + Conversor - + diff --git a/docs/conversor_alura_one/cl/conversor/app/class-use/Conversor.html b/docs/conversor_alura_one/cl/conversor/app/class-use/Conversor.html index cda370f..31e71aa 100644 --- a/docs/conversor_alura_one/cl/conversor/app/class-use/Conversor.html +++ b/docs/conversor_alura_one/cl/conversor/app/class-use/Conversor.html @@ -1,11 +1,11 @@ - + Uses of Class cl.conversor.app.Conversor - + diff --git a/docs/conversor_alura_one/cl/conversor/app/package-summary.html b/docs/conversor_alura_one/cl/conversor/app/package-summary.html index 56624bc..d9cd871 100644 --- a/docs/conversor_alura_one/cl/conversor/app/package-summary.html +++ b/docs/conversor_alura_one/cl/conversor/app/package-summary.html @@ -1,11 +1,11 @@ - + cl.conversor.app - + diff --git a/docs/conversor_alura_one/cl/conversor/app/package-tree.html b/docs/conversor_alura_one/cl/conversor/app/package-tree.html index cc6d47b..7358736 100644 --- a/docs/conversor_alura_one/cl/conversor/app/package-tree.html +++ b/docs/conversor_alura_one/cl/conversor/app/package-tree.html @@ -1,11 +1,11 @@ - + cl.conversor.app Class Hierarchy - + diff --git a/docs/conversor_alura_one/cl/conversor/app/package-use.html b/docs/conversor_alura_one/cl/conversor/app/package-use.html index 0ba54c8..b337206 100644 --- a/docs/conversor_alura_one/cl/conversor/app/package-use.html +++ b/docs/conversor_alura_one/cl/conversor/app/package-use.html @@ -1,11 +1,11 @@ - + Uses of Package cl.conversor.app - + diff --git a/docs/conversor_alura_one/cl/conversor/moneda/Moneda.html b/docs/conversor_alura_one/cl/conversor/moneda/Moneda.html index 814bbda..ef9003b 100644 --- a/docs/conversor_alura_one/cl/conversor/moneda/Moneda.html +++ b/docs/conversor_alura_one/cl/conversor/moneda/Moneda.html @@ -1,11 +1,11 @@ - + Moneda - + diff --git a/docs/conversor_alura_one/cl/conversor/moneda/class-use/Moneda.html b/docs/conversor_alura_one/cl/conversor/moneda/class-use/Moneda.html index 16c05e5..23856af 100644 --- a/docs/conversor_alura_one/cl/conversor/moneda/class-use/Moneda.html +++ b/docs/conversor_alura_one/cl/conversor/moneda/class-use/Moneda.html @@ -1,11 +1,11 @@ - + Uses of Enum Class cl.conversor.moneda.Moneda - + diff --git a/docs/conversor_alura_one/cl/conversor/moneda/package-summary.html b/docs/conversor_alura_one/cl/conversor/moneda/package-summary.html index bd1f02a..4196326 100644 --- a/docs/conversor_alura_one/cl/conversor/moneda/package-summary.html +++ b/docs/conversor_alura_one/cl/conversor/moneda/package-summary.html @@ -1,11 +1,11 @@ - + cl.conversor.moneda - + diff --git a/docs/conversor_alura_one/cl/conversor/moneda/package-tree.html b/docs/conversor_alura_one/cl/conversor/moneda/package-tree.html index cdcafcd..f669c13 100644 --- a/docs/conversor_alura_one/cl/conversor/moneda/package-tree.html +++ b/docs/conversor_alura_one/cl/conversor/moneda/package-tree.html @@ -1,11 +1,11 @@ - + cl.conversor.moneda Class Hierarchy - + diff --git a/docs/conversor_alura_one/cl/conversor/moneda/package-use.html b/docs/conversor_alura_one/cl/conversor/moneda/package-use.html index 8b3b213..64193fa 100644 --- a/docs/conversor_alura_one/cl/conversor/moneda/package-use.html +++ b/docs/conversor_alura_one/cl/conversor/moneda/package-use.html @@ -1,11 +1,11 @@ - + Uses of Package cl.conversor.moneda - + diff --git a/docs/conversor_alura_one/cl/conversor/vista/cli/ConversorCli.html b/docs/conversor_alura_one/cl/conversor/vista/cli/ConversorCli.html index ce88714..ecaac2c 100644 --- a/docs/conversor_alura_one/cl/conversor/vista/cli/ConversorCli.html +++ b/docs/conversor_alura_one/cl/conversor/vista/cli/ConversorCli.html @@ -1,11 +1,11 @@ - + ConversorCli - + @@ -160,6 +160,17 @@ loadScripts(document, 'script');

Method Details

diff --git a/docs/conversor_alura_one/cl/conversor/vista/cli/class-use/ConversorCli.html b/docs/conversor_alura_one/cl/conversor/vista/cli/class-use/ConversorCli.html index 6a0a670..8631533 100644 --- a/docs/conversor_alura_one/cl/conversor/vista/cli/class-use/ConversorCli.html +++ b/docs/conversor_alura_one/cl/conversor/vista/cli/class-use/ConversorCli.html @@ -1,11 +1,11 @@ - + Uses of Class cl.conversor.vista.cli.ConversorCli - + diff --git a/docs/conversor_alura_one/cl/conversor/vista/cli/package-summary.html b/docs/conversor_alura_one/cl/conversor/vista/cli/package-summary.html index 04d8d65..d43e701 100644 --- a/docs/conversor_alura_one/cl/conversor/vista/cli/package-summary.html +++ b/docs/conversor_alura_one/cl/conversor/vista/cli/package-summary.html @@ -1,11 +1,11 @@ - + cl.conversor.vista.cli - + diff --git a/docs/conversor_alura_one/cl/conversor/vista/cli/package-tree.html b/docs/conversor_alura_one/cl/conversor/vista/cli/package-tree.html index 321c021..ecc4bb6 100644 --- a/docs/conversor_alura_one/cl/conversor/vista/cli/package-tree.html +++ b/docs/conversor_alura_one/cl/conversor/vista/cli/package-tree.html @@ -1,11 +1,11 @@ - + cl.conversor.vista.cli Class Hierarchy - + diff --git a/docs/conversor_alura_one/cl/conversor/vista/cli/package-use.html b/docs/conversor_alura_one/cl/conversor/vista/cli/package-use.html index 6ca53c9..898f2a1 100644 --- a/docs/conversor_alura_one/cl/conversor/vista/cli/package-use.html +++ b/docs/conversor_alura_one/cl/conversor/vista/cli/package-use.html @@ -1,11 +1,11 @@ - + Uses of Package cl.conversor.vista.cli - + diff --git a/docs/conversor_alura_one/cl/conversor/vista/tui/Color.html b/docs/conversor_alura_one/cl/conversor/vista/tui/Color.html index d1a043b..13238fc 100644 --- a/docs/conversor_alura_one/cl/conversor/vista/tui/Color.html +++ b/docs/conversor_alura_one/cl/conversor/vista/tui/Color.html @@ -1,11 +1,11 @@ - + Color - + diff --git a/docs/conversor_alura_one/cl/conversor/vista/tui/ConversorTui.html b/docs/conversor_alura_one/cl/conversor/vista/tui/ConversorTui.html index 0379929..f6688c4 100644 --- a/docs/conversor_alura_one/cl/conversor/vista/tui/ConversorTui.html +++ b/docs/conversor_alura_one/cl/conversor/vista/tui/ConversorTui.html @@ -1,11 +1,11 @@ - + ConversorTui - + diff --git a/docs/conversor_alura_one/cl/conversor/vista/tui/LimpiarConsola.html b/docs/conversor_alura_one/cl/conversor/vista/tui/LimpiarConsola.html index 301b4d2..e4b97fb 100644 --- a/docs/conversor_alura_one/cl/conversor/vista/tui/LimpiarConsola.html +++ b/docs/conversor_alura_one/cl/conversor/vista/tui/LimpiarConsola.html @@ -1,11 +1,11 @@ - + LimpiarConsola - + diff --git a/docs/conversor_alura_one/cl/conversor/vista/tui/MenuPrincipal.html b/docs/conversor_alura_one/cl/conversor/vista/tui/MenuPrincipal.html index a5de7c1..478a26d 100644 --- a/docs/conversor_alura_one/cl/conversor/vista/tui/MenuPrincipal.html +++ b/docs/conversor_alura_one/cl/conversor/vista/tui/MenuPrincipal.html @@ -1,11 +1,11 @@ - + MenuPrincipal - + diff --git a/docs/conversor_alura_one/cl/conversor/vista/tui/class-use/Color.html b/docs/conversor_alura_one/cl/conversor/vista/tui/class-use/Color.html index 1064380..add0f59 100644 --- a/docs/conversor_alura_one/cl/conversor/vista/tui/class-use/Color.html +++ b/docs/conversor_alura_one/cl/conversor/vista/tui/class-use/Color.html @@ -1,11 +1,11 @@ - + Uses of Enum Class cl.conversor.vista.tui.Color - + diff --git a/docs/conversor_alura_one/cl/conversor/vista/tui/class-use/ConversorTui.html b/docs/conversor_alura_one/cl/conversor/vista/tui/class-use/ConversorTui.html index 60ae4eb..3994d83 100644 --- a/docs/conversor_alura_one/cl/conversor/vista/tui/class-use/ConversorTui.html +++ b/docs/conversor_alura_one/cl/conversor/vista/tui/class-use/ConversorTui.html @@ -1,11 +1,11 @@ - + Uses of Class cl.conversor.vista.tui.ConversorTui - + diff --git a/docs/conversor_alura_one/cl/conversor/vista/tui/class-use/LimpiarConsola.html b/docs/conversor_alura_one/cl/conversor/vista/tui/class-use/LimpiarConsola.html index d14c9ba..651823d 100644 --- a/docs/conversor_alura_one/cl/conversor/vista/tui/class-use/LimpiarConsola.html +++ b/docs/conversor_alura_one/cl/conversor/vista/tui/class-use/LimpiarConsola.html @@ -1,11 +1,11 @@ - + Uses of Interface cl.conversor.vista.tui.LimpiarConsola - + diff --git a/docs/conversor_alura_one/cl/conversor/vista/tui/class-use/MenuPrincipal.html b/docs/conversor_alura_one/cl/conversor/vista/tui/class-use/MenuPrincipal.html index fa4a77f..2e1d576 100644 --- a/docs/conversor_alura_one/cl/conversor/vista/tui/class-use/MenuPrincipal.html +++ b/docs/conversor_alura_one/cl/conversor/vista/tui/class-use/MenuPrincipal.html @@ -1,11 +1,11 @@ - + Uses of Class cl.conversor.vista.tui.MenuPrincipal - + diff --git a/docs/conversor_alura_one/cl/conversor/vista/tui/package-summary.html b/docs/conversor_alura_one/cl/conversor/vista/tui/package-summary.html index 45a1531..e0d7cfb 100644 --- a/docs/conversor_alura_one/cl/conversor/vista/tui/package-summary.html +++ b/docs/conversor_alura_one/cl/conversor/vista/tui/package-summary.html @@ -1,11 +1,11 @@ - + cl.conversor.vista.tui - + diff --git a/docs/conversor_alura_one/cl/conversor/vista/tui/package-tree.html b/docs/conversor_alura_one/cl/conversor/vista/tui/package-tree.html index ed6fb17..9476c1a 100644 --- a/docs/conversor_alura_one/cl/conversor/vista/tui/package-tree.html +++ b/docs/conversor_alura_one/cl/conversor/vista/tui/package-tree.html @@ -1,11 +1,11 @@ - + cl.conversor.vista.tui Class Hierarchy - + diff --git a/docs/conversor_alura_one/cl/conversor/vista/tui/package-use.html b/docs/conversor_alura_one/cl/conversor/vista/tui/package-use.html index e2db0cc..9d49eb7 100644 --- a/docs/conversor_alura_one/cl/conversor/vista/tui/package-use.html +++ b/docs/conversor_alura_one/cl/conversor/vista/tui/package-use.html @@ -1,11 +1,11 @@ - + Uses of Package cl.conversor.vista.tui - + diff --git a/docs/conversor_alura_one/module-summary.html b/docs/conversor_alura_one/module-summary.html index b31a7c5..046f884 100644 --- a/docs/conversor_alura_one/module-summary.html +++ b/docs/conversor_alura_one/module-summary.html @@ -1,11 +1,11 @@ - + conversor_alura_one - + diff --git a/docs/help-doc.html b/docs/help-doc.html index c0a59e4..174f7a4 100644 --- a/docs/help-doc.html +++ b/docs/help-doc.html @@ -1,11 +1,11 @@ - + API Help - + diff --git a/docs/index-files/index-1.html b/docs/index-files/index-1.html index 9180a85..9a5142f 100644 --- a/docs/index-files/index-1.html +++ b/docs/index-files/index-1.html @@ -1,11 +1,11 @@ - + A-Index - + diff --git a/docs/index-files/index-10.html b/docs/index-files/index-10.html index f4e01f4..7211e1c 100644 --- a/docs/index-files/index-10.html +++ b/docs/index-files/index-10.html @@ -1,11 +1,11 @@ - + P-Index - + diff --git a/docs/index-files/index-11.html b/docs/index-files/index-11.html index 37dddcc..e604cc4 100644 --- a/docs/index-files/index-11.html +++ b/docs/index-files/index-11.html @@ -1,11 +1,11 @@ - + R-Index - + diff --git a/docs/index-files/index-12.html b/docs/index-files/index-12.html index e2cc8c2..9fa0916 100644 --- a/docs/index-files/index-12.html +++ b/docs/index-files/index-12.html @@ -1,11 +1,11 @@ - + S-Index - + diff --git a/docs/index-files/index-13.html b/docs/index-files/index-13.html index e5474cc..d3416fd 100644 --- a/docs/index-files/index-13.html +++ b/docs/index-files/index-13.html @@ -1,11 +1,11 @@ - + T-Index - + diff --git a/docs/index-files/index-14.html b/docs/index-files/index-14.html index 7c98a9f..3005d5e 100644 --- a/docs/index-files/index-14.html +++ b/docs/index-files/index-14.html @@ -1,11 +1,11 @@ - + U-Index - + diff --git a/docs/index-files/index-15.html b/docs/index-files/index-15.html index b46176e..a3b2f02 100644 --- a/docs/index-files/index-15.html +++ b/docs/index-files/index-15.html @@ -1,11 +1,11 @@ - + V-Index - + diff --git a/docs/index-files/index-16.html b/docs/index-files/index-16.html index f8b1551..bb7b54d 100644 --- a/docs/index-files/index-16.html +++ b/docs/index-files/index-16.html @@ -1,11 +1,11 @@ - + W-Index - + diff --git a/docs/index-files/index-17.html b/docs/index-files/index-17.html index 82b4a38..6768139 100644 --- a/docs/index-files/index-17.html +++ b/docs/index-files/index-17.html @@ -1,11 +1,11 @@ - + Y-Index - + diff --git a/docs/index-files/index-2.html b/docs/index-files/index-2.html index a36d681..bc053d3 100644 --- a/docs/index-files/index-2.html +++ b/docs/index-files/index-2.html @@ -1,11 +1,11 @@ - + B-Index - + diff --git a/docs/index-files/index-3.html b/docs/index-files/index-3.html index 202eebb..51eb54f 100644 --- a/docs/index-files/index-3.html +++ b/docs/index-files/index-3.html @@ -1,11 +1,11 @@ - + C-Index - + diff --git a/docs/index-files/index-4.html b/docs/index-files/index-4.html index a131370..aa2e108 100644 --- a/docs/index-files/index-4.html +++ b/docs/index-files/index-4.html @@ -1,11 +1,11 @@ - + E-Index - + diff --git a/docs/index-files/index-5.html b/docs/index-files/index-5.html index 7c98337..1032ed7 100644 --- a/docs/index-files/index-5.html +++ b/docs/index-files/index-5.html @@ -1,11 +1,11 @@ - + G-Index - + diff --git a/docs/index-files/index-6.html b/docs/index-files/index-6.html index 57938e7..851a9f3 100644 --- a/docs/index-files/index-6.html +++ b/docs/index-files/index-6.html @@ -1,11 +1,11 @@ - + J-Index - + diff --git a/docs/index-files/index-7.html b/docs/index-files/index-7.html index 532ff66..b8229de 100644 --- a/docs/index-files/index-7.html +++ b/docs/index-files/index-7.html @@ -1,11 +1,11 @@ - + K-Index - + diff --git a/docs/index-files/index-8.html b/docs/index-files/index-8.html index acefad6..ff504d8 100644 --- a/docs/index-files/index-8.html +++ b/docs/index-files/index-8.html @@ -1,11 +1,11 @@ - + L-Index - + diff --git a/docs/index-files/index-9.html b/docs/index-files/index-9.html index 475e015..9646b44 100644 --- a/docs/index-files/index-9.html +++ b/docs/index-files/index-9.html @@ -1,11 +1,11 @@ - + M-Index - + diff --git a/docs/index.html b/docs/index.html index 4730b5f..016da27 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,11 +1,11 @@ - + Generated Documentation (Untitled) - + diff --git a/docs/overview-tree.html b/docs/overview-tree.html index 29ad234..0c8cf2e 100644 --- a/docs/overview-tree.html +++ b/docs/overview-tree.html @@ -1,11 +1,11 @@ - + Class Hierarchy - + diff --git a/media/conv_cli_ayuda.png b/media/conv_cli_ayuda.png new file mode 100644 index 0000000..9891f66 Binary files /dev/null and b/media/conv_cli_ayuda.png differ diff --git a/media/conv_cli_ejm.png b/media/conv_cli_ejm.png new file mode 100644 index 0000000..35b7f94 Binary files /dev/null and b/media/conv_cli_ejm.png differ diff --git a/media/conv_tui_ejm.png b/media/conv_tui_ejm.png new file mode 100644 index 0000000..63be831 Binary files /dev/null and b/media/conv_tui_ejm.png differ diff --git a/media/conv_tui_menu.png b/media/conv_tui_menu.png new file mode 100644 index 0000000..813e496 Binary files /dev/null and b/media/conv_tui_menu.png differ diff --git a/src/cl/conversor/vista/cli/ConversorCli.java b/src/cl/conversor/vista/cli/ConversorCli.java index e5193ba..513c087 100644 --- a/src/cl/conversor/vista/cli/ConversorCli.java +++ b/src/cl/conversor/vista/cli/ConversorCli.java @@ -8,6 +8,34 @@ import cl.conversor.moneda.Moneda; */ public class ConversorCli { + /** + * Main CLI application + * @param args String[3] (currency, currency, amount) + */ + public static void main(String[] args) { + String origen = ""; + String destino = ""; + Double monto = 0.0; + try { + if (esMoneda(args[0].toUpperCase())) { + origen = args[0].toUpperCase(); + } + if (esMoneda(args[1].toUpperCase())) { + destino = args[1].toUpperCase(); + } + monto = Double.valueOf(args[2]); + String resultado = conversion(Moneda.valueOf(origen), Moneda.valueOf(destino), monto).toString(); + StringBuilder convert_repr = new StringBuilder(); + convert_repr.append("\nConversion de "+origen+" "+Moneda.valueOf(origen).symbol()); + convert_repr.append(" "+monto+" a "+destino+" "+Moneda.valueOf(destino).symbol()); + convert_repr.append(" "+resultado+"\n"); + System.out.println(convert_repr); + } catch (Exception e){ + ayuda(); + } + System.exit(0); + } + /** * @param orig Origin currency * @param dest Target currency @@ -39,38 +67,15 @@ public class ConversorCli { StringBuilder resultado = new StringBuilder(); resultado.append("\n\nConversor de Monedas\n\n"); resultado.append("USO\n java -jar Conversor.jar \n\n"); - resultado.append("OPCIONES\n GUI Mode - > java -jar Conversor\n"); - resultado.append(" TUI Mode - > java -jar Conversor TUI\n"); - resultado.append(" CLI Mode - > java -jar Conversor \n"); - resultado.append(" ej. java -jar Conversor CLP JPY 1000\n\n"); + resultado.append("OPCIONES\n GUI Mode - java -jar Conversor\n"); + resultado.append(" TUI Mode - java -jar Conversor TUI\n"); + resultado.append(" CLI Mode - java -jar Conversor \n"); + resultado.append(" ej. java -jar Conversor CLP JPY 1000\n\nMONEDAS\n "); + for (Moneda moneda : Moneda.values()) { + resultado.append(" "+moneda.name()+" "); + } + resultado.append(""); System.out.println(resultado.toString()); } - /** - * Main CLI application - * @param args String[3] (currency, currency, amount) - */ - public static void main(String[] args) { - String origen = ""; - String destino = ""; - Double monto = 0.0; - try { - if (esMoneda(args[0].toUpperCase())) { - origen = args[0].toUpperCase(); - } - if (esMoneda(args[1].toUpperCase())) { - destino = args[1].toUpperCase(); - } - monto = Double.valueOf(args[2]); - String resultado = conversion(Moneda.valueOf(origen), Moneda.valueOf(destino), monto).toString(); - StringBuilder convert_repr = new StringBuilder(); - convert_repr.append("\nConversion de "+origen+" "+Moneda.valueOf(origen).symbol()); - convert_repr.append(" "+monto+" a "+destino+" "+Moneda.valueOf(destino).symbol()); - convert_repr.append(" "+resultado+"\n"); - System.out.println(convert_repr); - } catch (Exception e){ - ayuda(); - } - System.exit(0); - } -} +} \ No newline at end of file diff --git a/target/Conversor.jar b/target/Conversor.jar index 7c19f97..4e4b485 100644 Binary files a/target/Conversor.jar and b/target/Conversor.jar differ