-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPrograma.java
More file actions
33 lines (22 loc) · 790 Bytes
/
Copy pathPrograma.java
File metadata and controls
33 lines (22 loc) · 790 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package br.com.conversorMoedas;
import javax.swing.JOptionPane;
public class Programa {
public void Executar() {
Funcao funcao = new Funcao();
MenuPrincipal menuPrincipal = new MenuPrincipal();
int continuar = 0;
while(continuar == 0) {
String valor2 = JOptionPane.showInputDialog("Insira um valor");
double valorinserido2 = Double.parseDouble(valor2);
funcao.Converter(valorinserido2);
continuar = JOptionPane.showConfirmDialog(null, "deseja continuar?", "aviso", JOptionPane.YES_NO_CANCEL_OPTION);
if(continuar == 1) {
JOptionPane.showMessageDialog(null, "Progama finalizado");
}if(continuar == 2) {
JOptionPane.showMessageDialog(null, "Progama concluído");
}if(continuar == 0) {
menuPrincipal.Executar();
}
}
}
}