Documentos de Académico
Documentos de Profesional
Documentos de Cultura
private String ruc; private String nombre; private double ahorro; cliente cli[]=new cliente[10]; //int ind=0;
public void registrar ()throws IOException { BufferedReader e=new BufferedReader(new InputStreamReader(System.in)); System.out.println("\tENTIDAD BOLSA DE VALORES: "); System.out.print("\tIngrese ruc: "); String ruc=e.readLine(); System.out.print("\tIngrese nombre: "); String nombre=e.readLine(); System.out.println("\tLLENADO DE CLIENTES: "); for(int x=0;x<3;x++) { System.out.print("\t\tIngrese ruc: "); String r1=e.readLine();
System.out.print("\t\tIngrese nombre: "); String no=e.readLine(); System.out.print("\t\tIngrese ahorro: "); Double ahorro=Double.parseDouble(e.readLine()); cli[x]=new cliente(); cli[x].registrar(r1,no,ahorrimport java.io.*; public class banco_Credito {
private String ruc; private String nombre; private double ahorro; cliente cli[]=new cliente[3]; //int ind=0;
System.out.println("\tENTIDAD BANCO DE CREDITO: "); System.out.print("\tIngrese ruc: "); String ruc=e.readLine(); System.out.print("\tIngrese nombre: "); String nombre=e.readLine();
System.out.println("\tLLENADO DE CLIENTES: "); for(int x=0;x<3;x++) { System.out.print("\t\tIngrese ruc: "); String r1=e.readLine(); System.out.print("\t\tIngrese nombre: "); String no=e.readLine(); System.out.print("\t\tIngrese ahorro: "); Double ahorro=Double.parseDouble(e.readLine()); cli[x]=new cliente(); cli[x].registrar(r1,no,ahorro); } } public void consultar () { System.out.println("Ruc: "+ruc); System.out.println("Nombre: "+nombre); System.out.println("Ahorro: "+ahorro); for(int x=0;x<3;x++) { cli[x].consultar(); }
public void busqueda (String ruc) { System.out.println("DATOS ENCONTRADOS: "); for(int x=0;x<3;x++) { if(cli[x].ruc.equals(ruc)) { cli[x].consultar(); } }
return tot;
public static void main(String []args)throws IOException { banco_Credito bc=new banco_Credito(); BufferedReader e=new BufferedReader(new InputStreamReader(System.in)); bc.registrar(); //bc.consultar(); System.out.println(""); System.out.println("Total Ahorros: "+bc.totalAhorro ()); //bc.busqueda (rucb);
} }o); } } public void consultar () { System.out.println("Ruc: "+ruc); System.out.println("Nombre: "+nombre); System.out.println("Ahorro: "+ahorro); for(int x=0;x<3;x++) { cli[x].consultar();
return tot; }
public void ordenarlAhorro() { double orden[]=new double[3]; double tot=0; for(int y=0;y<3;y++) { orden[y]=cli[y].ahorro; }
public static void main(String []args)throws IOException { Bolsa_Valores bv=new Bolsa_Valores(); BufferedReader e=new BufferedReader(new InputStreamReader(System.in)); bv.registrar(); //bc.consultar(); System.out.println("");
} } //BOLSA DE VALORES
import java.io.*;
private String ruc; private String nombre; private double ahorro; cliente cli[]=new cliente[10]; //int ind=0;
public void registrar ()throws IOException { BufferedReader e=new BufferedReader(new InputStreamReader(System.in)); System.out.println("\tENTIDAD BOLSA DE VALORES: "); System.out.print("\tIngrese ruc: "); String ruc=e.readLine(); System.out.print("\tIngrese nombre: "); String nombre=e.readLine(); System.out.println("\tLLENADO DE CLIENTES: "); for(int x=0;x<3;x++) { System.out.print("\t\tIngrese ruc: "); String r1=e.readLine(); System.out.print("\t\tIngrese nombre: "); String no=e.readLine();
System.out.print("\t\tIngrese ahorro: "); Double ahorro=Double.parseDouble(e.readLine()); cli[x]=new cliente(); cli[x].registrar(r1,no,ahorro); } } public void consultar () { System.out.println("Ruc: "+ruc); System.out.println("Nombre: "+nombre); System.out.println("Ahorro: "+ahorro); for(int x=0;x<3;x++) { cli[x].consultar(); }
cli[x].consultar(); } }
return tot; }
public void ordenarlAhorro() { double orden[]=new double[3]; double tot=0; for(int y=0;y<3;y++) {
orden[y]=cli[y].ahorro; }
for(int i=0;i<(3-1);i++) { for(int j=i+1;j<3;j++) { if(orden[i]<orden[j]) { double temp=orden[i]; orden[i]=orden[j]; orden[j]=temp; } } } for(int y=0;y<3;y++) { System.out.println(""+orden[y]); } } public static void main(String []args)throws IOException { Bolsa_Valores bv=new Bolsa_Valores(); BufferedReader e=new BufferedReader(new InputStreamReader(System.in));
bv.registrar(); //bc.consultar(); System.out.println(""); System.out.println("Ordenando los montos: "); bv.ordenarlAhorro(); } } //CLIENTE public class cliente {
public void registrar (String ru,String nom,double ahor) { ruc=ru; nombre=nom; ahorro=ahor; }
private String ruc; private String nombre; private double ahorro; cliente cli[]=new cliente[3]; //int ind=0;
System.out.println("\tENTIDAD FINANCIERA CREDITO: "); System.out.print("\tIngrese ruc: "); String ruc=e.readLine(); System.out.print("\tIngrese nombre: "); String nombre=e.readLine(); System.out.println("\tLLENADO DE CLIENTES: "); for(int x=0;x<3;x++) { System.out.print("\t\tIngrese ruc: "); String r1=e.readLine(); System.out.print("\t\tIngrese nombre: "); String no=e.readLine(); System.out.print("\t\tIngrese ahorro: "); Double ahorro=Double.parseDouble(e.readLine()); cli[x]=new cliente(); cli[x].registrar(r1,no,ahorro); } } public void consultar () { System.out.println("Ruc: "+ruc); System.out.println("Nombre: "+nombre); import java.io.*;
private String ruc; private String nombre; private double ahorro; cliente cli[]=new cliente[3]; //int ind=0;
public void registrar ()throws IOException { BufferedReader e=new BufferedReader(new InputStreamReader(System.in)); System.out.println("\tENTIDAD FINANCIERA CREDITO: "); System.out.print("\tIngrese ruc: "); String ruc=e.readLine(); System.out.print("\tIngrese nombre: "); String nombre=e.readLine(); System.out.println("\tLLENADO DE CLIENTES: "); for(int x=0;x<3;x++) { System.out.print("\t\tIngrese ruc: "); String r1=e.readLine(); System.out.print("\t\tIngrese nombre: "); String no=e.readLine();
System.out.print("\t\tIngrese ahorro: "); Double ahorro=Double.parseDouble(e.readLine()); cli[x]=new cliente(); cli[x].registrar(r1,no,ahorro); } } public void consultar () { System.out.println("Ruc: "+ruc); System.out.println("Nombre: "+nombre); System.out.println("Ahorro: "+ahorro); for(int x=0;x<3;x++) { cli[x].consultar(); } }
} }
return tot; } public static void main(String []args)throws IOException { financiera_Credito fc=new financiera_Credito(); BufferedReader e=new BufferedReader(new InputStreamReader(System.in)); fc.registrar(); //bc.consultar(); System.out.println(""); System.out.println("Ingrese en ruc a buscar: "); String rucb=e.readLine(); fc.busqueda (rucb);
} }System.out.println("Ahorro: "+ahorro); for(int x=0;x<3;x++) { cli[x].consultar(); } } public void busqueda (String ruc) { for(int x=0;x<3;x++) { if(cli[x].ruc.equals(ruc)) { cli[x].consultar(); } } }
return tot; }
public static void main(String []args)throws IOException { financiera_Credito fc=new financiera_Credito(); BufferedReader e=new BufferedReader(new InputStreamReader(System.in)); fc.registrar(); //bc.consultar(); System.out.println(""); System.out.println("Ingrese en ruc a buscar: "); String rucb=e.readLine(); fc.busqueda (rucb);
} }
//GRUPO BCP
String RazonSoc; String direccion; double capital; banco_Credito bc=new banco_Credito(); financiera_Credito fc=new financiera_Credito(); Bolsa_Valores bv=new Bolsa_Valores() ;
public void registrar()throws IOException { BufferedReader e=new BufferedReader(new InputStreamReader(System.in)); System.out.println("DATOS DEL GRUPO GRUPO_BCP: "); System.out.print("ingrese ruc: "); ruc=e.readLine(); System.out.print("ingrese razonsocial: "); RazonSoc=e.readLine(); System.out.print("ingrese direccion: "); direccion=e.readLine(); bc.registrar(); fc.registrar(); bv.registrar(); }
public static void main(String []args)throws IOException { Grupo_BCP bv=new Grupo_BCP(); BufferedReader e=new BufferedReader(new InputStreamReader(System.in)); bv.registrar(); System.out.println(""); bv.sumatoria();
} } //INCODEX
<workspace_user>
<active_project>
<label>EJERCICIOS</label>
</active_project>
<projects>
<project>
<label>EJERCICIOS</label>
<showfiles>false</showfiles>
</project>
</projects>
<open_files>
<docitem>
<path>EJERCICIOS\cliente.java</path>
<source>true</source>
<index>0</index>
<active>true</active>
</docitem>
<docitem>
<path>EJERCICIOS\banco_Credito.java</path>
<source>true</source>
<index>1</index>
<active>false</active>
</docitem>
<docitem>
<path>EJERCICIOS\financiera_Credito.java</path>
<source>true</source>
<index>2</index>
<active>false</active>
</docitem>
<docitem>
<path>EJERCICIOS\Bolsa_Valores.java</path>
<source>true</source>
<index>3</index>
<active>false</active>
</docitem>
<docitem>
<path>EJERCICIOS\Grupo_BCP.java</path>
<source>true</source>
<index>4</index>
<active>false</active>
</docitem>
</open_files>
</workspace_user>
#_______------_______-----import java.io.*;
InputStreamReader isr= new InputStreamReader(System.in); BufferedReader flujo = new BufferedReader(isr); vDato = flujo.readLine(); } catch(IOException e) {} return vDato; } }
class alumno {private int codigo; private String nombre; alumno() { System.out.println("Ingrese codigo"); codigo=Integer.parseInt(Leer.lectura()); System.out.println("Ingrese nombre"); nombre=Leer.lectura(); } public void consultar() {System.out.println("Codigo del alumno:" +codigo); System.out.println("Nombre del alumno:" +nombre); } } public class Ejemplo_09
{ public static void main(String args[]) {System.out.println("Ingrese datos"); System.out.println("_____________"); alumno a1=new alumno(); System.out.println("consulta de datos"); System.out.println("_________________"); a1.consultar(); } }