Documentos de Académico
Documentos de Profesional
Documentos de Cultura
pkg3;
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
obj.Ingreso();
obj.Imprimir();
}
}
package javataller.pkg3;
import java.io.*;
/**
*
* @author espe
*/
public class Casa {
do{
System.out.println("\nSeleccione tipo de casa\n ");
System.out.println(" 1.Tipo \n Un piso\n habitaciones master y una habitacion\n valor
20000\n mantenimiento 3 dolares ");
System.out.println("\n 2.Tipo \n Dos pisos\n 3 habitaciones \n valor 45500\n
mantenimiento 10 dolares ");
System.out.println("\n 3.Tipo \n Tres pisos\n 5 habitaciones \n valor 65200\n
mantenimiento 14 dolares ");
try{
}catch(IOException e){
System.err.println("Error" + e.getMessage());
}
switch(op){
case 1:
num_planta="1 Planta";
numero_habitaciones=3;
valor =20000;
mantenimiento=3;
break;
case 2:
num_planta="2 Plantas";
numero_habitaciones=3;
mantenimiento=10;
valor =45500;
break;
case 3:
num_planta=" 3 Plantas";
numero_habitaciones=5;
mantenimiento=14;
valor =65200;
break;
}while(op<1||op>3);
}
public void Imprimir(){
System.out.println( num_planta);
System.out.println("Numero Habitaciones " +numero_habitaciones);
System.out.println("Mantenimiento " + mantenimiento);
System.out.println("Valor de Casa " + valor);
}
}
String dato="";
try{
System.out.printf("Ingrese nombre ");
InputStreamReader isr = new InputStreamReader(System.in);
BufferedReader streamInput = new BufferedReader(isr);
nombre= streamInput.readLine();
}catch(IOException e){
System.err.println("Error" + e.getMessage());
}
try{
}catch(IOException e){
System.err.println("Error" + e.getMessage());
}
System.out.println("");
datos_cliente.Ingreso();
datos_empleado.Ingreso();
datos_casa.Ingreso();
System.out.println(""); }
public void Imprimir(){
System.out.println(" Registro Nro " +registro_de_ventas);
datos_cliente.Imprimir();
datos_empleado.Imprimir();
datos_casa.Imprimir();
datos_empleado.imprimir_comision();
}
String dato="";
try{
System.out.printf("Ingrese Nombre del empleado ");
InputStreamReader isr = new InputStreamReader(System.in);
BufferedReader streamInput = new BufferedReader(isr);
nombre= streamInput.readLine();
}catch(IOException e){
System.err.println("Error" + e.getMessage());
}
try{
}catch(IOException e){
System.err.println("Error" + e.getMessage());
}
do{
System.out.println("\nSeleccione tipo de casa vendida \n ");
System.out.println("Tipo1 ");
System.out.println("Tipo2");
System.out.println("Tipo3 ");
try{
System.out.printf("Ingrese Opcion ");
InputStreamReader isr = new InputStreamReader(System.in);
BufferedReader streamInput = new BufferedReader(isr);
dato= streamInput.readLine();
op=Integer.parseInt(dato);
}catch(IOException e){
System.err.println("Error" + e.getMessage());
}
switch(op){
case 1:
comision_de_empleado= ((20000*0.5)/100);
break;
case 2:
comision_de_empleado= ((45500*0.75)/100);
break;
case 3:
comision_de_empleado= ((65200*1)/100);
break;
}while(op<1||op>3);
System.out.println("Nombre: "+nombre);
}
public void imprimir_comision(){