SlideShare a Scribd company logo
1 of 1
package bancocic;
import javax.swing.JOptionPane;
/**
 *
 * @author Aula E1
 */
public class Main {


      /**
       * @param args the command line arguments
       */
      public static void main(String[] args) {


          // TODO code application logic here


          Usuario c1= new Usuario();
do{
          String resp,monto;
          int   op;


resp=JOptionPane.showInputDialog("Bancon1.-Consultarn2.-Depositarn3.-Ret-
irarn4.-Transaccionesn5.-Salir");


          op=Integer.parseInt(resp);


        if(op==1) { JOptionPane.showMessageDialog(null,"SALDO: " +
c1.Consultar());}
        if(op==2) { monto="";monto=JOptionPane.showInputDialog("Ingresa
Monto: "); c1.Depositar(Integer.parseInt(monto));}
        if(op==3) { monto="";monto=JOptionPane.showInputDialog("Ingresa
Monto: "); c1.Retirar(Integer.parseInt(monto));}
        if(op==4) { JOptionPane.showMessageDialog(null,"NUMTRANS: " +
c1.Consultartrans());}
        if(op==5){ break;}


}


          while(true);

      }

More Related Content

What's hot

Progrma para calcular los numeros pares e impares
Progrma para calcular los numeros pares e imparesProgrma para calcular los numeros pares e impares
Progrma para calcular los numeros pares e imparesnacho155
 
Bcsl 033 data and file structures lab s4-3
Bcsl 033 data and file structures lab s4-3Bcsl 033 data and file structures lab s4-3
Bcsl 033 data and file structures lab s4-3Dr. Loganathan R
 
listing output program C
listing output program Clisting output program C
listing output program CAdjievanGestu
 
Program to remove Left factoring
Program to remove Left factoringProgram to remove Left factoring
Program to remove Left factoringShraddha Patel
 
Sujet bac info 2012 g1, g2 et g3 avec correction
Sujet bac info 2012 g1, g2 et g3 avec correctionSujet bac info 2012 g1, g2 et g3 avec correction
Sujet bac info 2012 g1, g2 et g3 avec correctionborhen boukthir
 
(Meta 4) ejemplo calcular la mitad de un numero dev c++
(Meta 4) ejemplo calcular la mitad de un numero dev c++ (Meta 4) ejemplo calcular la mitad de un numero dev c++
(Meta 4) ejemplo calcular la mitad de un numero dev c++ Eli Diaz
 
Structure of c program | CS8251 | Programming in c | Learn Hub
Structure of c program | CS8251 | Programming in c | Learn HubStructure of c program | CS8251 | Programming in c | Learn Hub
Structure of c program | CS8251 | Programming in c | Learn HubLearn Hub
 
Bcsl 033 data and file structures lab s1-2
Bcsl 033 data and file structures lab s1-2Bcsl 033 data and file structures lab s1-2
Bcsl 033 data and file structures lab s1-2Dr. Loganathan R
 
PROBLEMAS DE PROGRAMACION 2 por jordan puente quinto
PROBLEMAS DE PROGRAMACION 2 por jordan puente quintoPROBLEMAS DE PROGRAMACION 2 por jordan puente quinto
PROBLEMAS DE PROGRAMACION 2 por jordan puente quintoJordan Puente
 
Как помочь и как помешать компилятору. Андрей Олейников ➠ CoreHard Autumn 2019
Как помочь и как помешать компилятору. Андрей Олейников ➠  CoreHard Autumn 2019Как помочь и как помешать компилятору. Андрей Олейников ➠  CoreHard Autumn 2019
Как помочь и как помешать компилятору. Андрей Олейников ➠ CoreHard Autumn 2019corehard_by
 

What's hot (19)

Progrma para calcular los numeros pares e impares
Progrma para calcular los numeros pares e imparesProgrma para calcular los numeros pares e impares
Progrma para calcular los numeros pares e impares
 
Docuemnto 6
Docuemnto 6Docuemnto 6
Docuemnto 6
 
Vcs6
Vcs6Vcs6
Vcs6
 
Bcsl 033 data and file structures lab s4-3
Bcsl 033 data and file structures lab s4-3Bcsl 033 data and file structures lab s4-3
Bcsl 033 data and file structures lab s4-3
 
JavaScript
JavaScriptJavaScript
JavaScript
 
week-24x
week-24xweek-24x
week-24x
 
listing output program C
listing output program Clisting output program C
listing output program C
 
Program to remove Left factoring
Program to remove Left factoringProgram to remove Left factoring
Program to remove Left factoring
 
Sujet bac info 2012 g1, g2 et g3 avec correction
Sujet bac info 2012 g1, g2 et g3 avec correctionSujet bac info 2012 g1, g2 et g3 avec correction
Sujet bac info 2012 g1, g2 et g3 avec correction
 
Ejercicios c#
Ejercicios c#Ejercicios c#
Ejercicios c#
 
(Meta 4) ejemplo calcular la mitad de un numero dev c++
(Meta 4) ejemplo calcular la mitad de un numero dev c++ (Meta 4) ejemplo calcular la mitad de un numero dev c++
(Meta 4) ejemplo calcular la mitad de un numero dev c++
 
Kelompok 2.6
Kelompok 2.6Kelompok 2.6
Kelompok 2.6
 
Structure of c program | CS8251 | Programming in c | Learn Hub
Structure of c program | CS8251 | Programming in c | Learn HubStructure of c program | CS8251 | Programming in c | Learn Hub
Structure of c program | CS8251 | Programming in c | Learn Hub
 
Sine prog
Sine progSine prog
Sine prog
 
Bcsl 033 data and file structures lab s1-2
Bcsl 033 data and file structures lab s1-2Bcsl 033 data and file structures lab s1-2
Bcsl 033 data and file structures lab s1-2
 
Los fantastico
Los fantasticoLos fantastico
Los fantastico
 
Trabajo de programacion
Trabajo de programacionTrabajo de programacion
Trabajo de programacion
 
PROBLEMAS DE PROGRAMACION 2 por jordan puente quinto
PROBLEMAS DE PROGRAMACION 2 por jordan puente quintoPROBLEMAS DE PROGRAMACION 2 por jordan puente quinto
PROBLEMAS DE PROGRAMACION 2 por jordan puente quinto
 
Как помочь и как помешать компилятору. Андрей Олейников ➠ CoreHard Autumn 2019
Как помочь и как помешать компилятору. Андрей Олейников ➠  CoreHard Autumn 2019Как помочь и как помешать компилятору. Андрей Олейников ➠  CoreHard Autumn 2019
Как помочь и как помешать компилятору. Андрей Олейников ➠ CoreHard Autumn 2019
 

Viewers also liked

Politicas del curso y del departamento de química
Politicas del curso y del departamento de químicaPoliticas del curso y del departamento de química
Politicas del curso y del departamento de químicalmbedian
 
FCP Schedule
FCP ScheduleFCP Schedule
FCP ScheduleAmy Lin
 
Buklet razvedka
Buklet razvedkaBuklet razvedka
Buklet razvedkapatriot29
 
African Snake Bite Institute - Snake Handling & Awareness
African Snake Bite Institute - Snake Handling & AwarenessAfrican Snake Bite Institute - Snake Handling & Awareness
African Snake Bite Institute - Snake Handling & AwarenessGerhard Theron
 

Viewers also liked (11)

Politicas del curso y del departamento de química
Politicas del curso y del departamento de químicaPoliticas del curso y del departamento de química
Politicas del curso y del departamento de química
 
Clamping rings
Clamping ringsClamping rings
Clamping rings
 
FCP Schedule
FCP ScheduleFCP Schedule
FCP Schedule
 
Buklet razvedka
Buklet razvedkaBuklet razvedka
Buklet razvedka
 
Evelyn wilkinson image 16
Evelyn wilkinson image 16Evelyn wilkinson image 16
Evelyn wilkinson image 16
 
Pau genetica
Pau geneticaPau genetica
Pau genetica
 
Jobs
JobsJobs
Jobs
 
Doc1
Doc1Doc1
Doc1
 
African Snake Bite Institute - Snake Handling & Awareness
African Snake Bite Institute - Snake Handling & AwarenessAfrican Snake Bite Institute - Snake Handling & Awareness
African Snake Bite Institute - Snake Handling & Awareness
 
Portafolio 6
Portafolio 6Portafolio 6
Portafolio 6
 
Practica 7a m10
Practica 7a m10Practica 7a m10
Practica 7a m10
 

Bancocic

  • 1. package bancocic; import javax.swing.JOptionPane; /** * * @author Aula E1 */ public class Main { /** * @param args the command line arguments */ public static void main(String[] args) { // TODO code application logic here Usuario c1= new Usuario(); do{ String resp,monto; int op; resp=JOptionPane.showInputDialog("Bancon1.-Consultarn2.-Depositarn3.-Ret- irarn4.-Transaccionesn5.-Salir"); op=Integer.parseInt(resp); if(op==1) { JOptionPane.showMessageDialog(null,"SALDO: " + c1.Consultar());} if(op==2) { monto="";monto=JOptionPane.showInputDialog("Ingresa Monto: "); c1.Depositar(Integer.parseInt(monto));} if(op==3) { monto="";monto=JOptionPane.showInputDialog("Ingresa Monto: "); c1.Retirar(Integer.parseInt(monto));} if(op==4) { JOptionPane.showMessageDialog(null,"NUMTRANS: " + c1.Consultartrans());} if(op==5){ break;} } while(true); }