diff --git b/Herencia/Cliente.java a/Herencia/Cliente.java new file mode 100644 index 0000000..7306488 --- /dev/null +++ a/Herencia/Cliente.java @@ -0,0 +1,28 @@ +public class Cliente{ + String nombre; + String membresia; + int producto; + int servicio; + public Cliente(String nombre,String membresia,int producto,int servicio){ + this.nombre=nombre; + this.membresia=membresia; + this.producto=producto; + this.servicio=servicio; + } + public Cliente(){} + + public String getNombre(){ + return nombre; + } + public String getMembresia(){ + return membresia; + } + public int getProducto(){ + return producto; + } + public int getServicio(){ + return servicio; + } + + +} \ No newline at end of file diff --git b/Herencia/ClienteOro.java a/Herencia/ClienteOro.java new file mode 100644 index 0000000..f22b9db --- /dev/null +++ a/Herencia/ClienteOro.java @@ -0,0 +1,10 @@ +public class ClienteOro extends ClientePlata{ + String Beneficios="\nSpa 1 vez por semana\n"; + double descuento=0.15; + public void ClienteOro(String nombre,String membresia,int producto,int servicio){ + this.nombre=nombre; + this.membresia=membresia; + this.producto=producto; + this.servicio=servicio; + } +} \ No newline at end of file diff --git b/Herencia/ClientePlata.java a/Herencia/ClientePlata.java new file mode 100644 index 0000000..df7ed3d --- /dev/null +++ a/Herencia/ClientePlata.java @@ -0,0 +1,10 @@ +public class ClientePlata extends Cliente{ + String Servicios="\nmasaje relajante\n"; + double descuento=0.10; + public ClientePlata(String nombre,String membresia,int producto,int servicio){ + this.nombre=nombre; + this.membresia=membresia; + this.producto=producto; + this.servicio=servicio; + } +} \ No newline at end of file diff --git b/Herencia/ClientePremiun.java a/Herencia/ClientePremiun.java new file mode 100644 index 0000000..85f3b20 --- /dev/null +++ a/Herencia/ClientePremiun.java @@ -0,0 +1,10 @@ +public class ClientePremiun extends ClienteOro{ + String premios="\nSorteos semanales con los puntos adquiridos\n"; + double descuento=0.20; + public ClientePremiun(String nombre,String membresia,int producto,int servicio){ + this.nombre=nombre; + this.membresia=membresia; + this.producto=producto; + this.servicio=servicio; + } +} \ No newline at end of file diff --git b/Herencia/MainCliente.java a/Herencia/MainCliente.java new file mode 100644 index 0000000..1935a96 --- /dev/null +++ a/Herencia/MainCliente.java @@ -0,0 +1,10 @@ +public class MainCliente{ + public static void main(String[] args) { + ClientePlata Luisa= new ClientePlata("luisa","plata",50,30); + ClienteOro Fernanda= new ClienteOro("Fernanda","Oro",20,15); + ClientePremiun Patricia=new ClientePremiun("Patricia","Premiun",50,100); + System.out.println("Nuestra cliente "+Luisa.getNombre()+" posee membresia"+Luisa.getMembresia()+"ademas de servicios como "+Patricia.Servicios); + System.out.println("Nuestra cliente "+Fernanda.getNombre()+" posee membresia"+Fernanda.getMembresia()+"que aplica"+Fernanda.Servicios+Fernanda.Beneficios); + System.out.println("Nuestra cliente "+Patricia.getNombre()+" posee membresia"+Patricia.getMembresia()+"que aplica"+Patricia.Servicios+Patricia.Beneficios+Patricia.premios); + } +} \ No newline at end of file diff --git b/Mochila/Mochila.class a/Mochila/Mochila.class new file mode 100644 index 0000000..9bc0fca Binary files /dev/null and a/Mochila/Mochila.class differ diff --git b/Mochila/Mochila.java a/Mochila/Mochila.java new file mode 100644 index 0000000..c87767a --- /dev/null +++ a/Mochila/Mochila.java @@ -0,0 +1,160 @@ +public class Mochila{ + public float maxPeso; + public void dimesionar(float maxPeso){ + this.maxPeso=maxPeso; + } + public void Mochila(){ + + } + public static void Ordenar(Objetos a[],int pos){ + Objetos aux=new Objetos(); + for(int i=0;ia[j].peso){ + aux=a[i]; + a[i]=a[j]; + a[j]=aux; + } + } + } + } + public static void max(Objetos a[],int pos,Float max){ + int t=0,p; + float total=0,c; + while(total0){ + frente--; + return arrays[frente]; + }else{return 0;} + + } + /*public float popf(){ + if(frente>0){ + frenteF--; + return arraysF[frenteF]; + }else{return 0;} + }*/ + public static void ordenarPila(Stack a){ + if(a.frente!=0){ + int temp= a.pop(); + ordenarPila(a); + insertarOrden(a,temp); + } + } + public static void insertarOrden(Stack a, int temp){ + if(a.frente==0 || temp>a.arrays[a.frente-1]){ + a.push(temp); + }else{ + int dato=a.pop(); + insertarOrden(a, temp); + a.push(dato); + } + } + + public static void main(String[] args) { + Stack a= new Stack(10); + //a.dimension(); + a.push(5); + a.push(4); + a.push(7); + a.push(6); + a.push(3); + a.push(1); + a.push(2); + ordenarPila(a); + //a.push(5.5f); + System.out.println(a.pop()); + System.out.println(a.pop()); + System.out.println(a.pop()); + System.out.println(a.pop()); + System.out.println(a.pop()); + System.out.println(a.pop()); + System.out.println(a.pop()); + //System.out.println(a.pop()); + //System.out.println(a.popf()); + } + +} \ No newline at end of file diff --git b/TABLA SQL UPS/UPS.SQL a/TABLA SQL UPS/UPS.SQL new file mode 100644 index 0000000..3a10dc5 --- /dev/null +++ a/TABLA SQL UPS/UPS.SQL @@ -0,0 +1,51 @@ +ALTER SESSION SET NLS_DATE_FORMAT = 'dd-mm-yyyy'; +CREATE TABLE CENTRO_UPS( + ID INTEGER NOT NULL, + TIPO VARCHAR(50), + DIRECCION VARCHAR(50) NOT NULL, + CONSTRAINT PK_ID PRIMARY KEY(ID) +); + +CREATE SEQUENCE SEQUENCE_ID + START WITH 1 + INCREMENT BY 1; + + +CREATE TABLE ARTICULOS( + NRO_ARTICULOS INTEGER NOT NULL, + ID_CENTRO INTEGER, + PESO FLOAT NOT NULL, + DIMENSION VARCHAR(10) NOT NULL, + IMPORTE INTEGER NOT NULL, + FECHA_FINAL DATE NOT NULL, + DESTINO VARCHAR(50) NOT NULL, + CONSTRAINT PK_NRO_ARTICULOS PRIMARY KEY(NRO_ARTICULOS), + CONSTRAINT FK_ID_CENTRO FOREIGN KEY(ID_CENTRO) REFERENCES CENTRO_UPS(ID) +); + +CREATE SEQUENCE SEQUENCE_NRO_ARTICULOS + START WITH 1 + INCREMENT BY 1; + +CREATE TABLE TRANSPORTE( + N_EVENTO INTEGER NOT NULL, + TIPO VARCHAR(20) NOT NULL, + RUTA VARCHAR(30) NOT NULL, + DIRECCION VARCHAR(30) NOT NULL, + CONSTRAINT PK_N_EVENTO PRIMARY KEY(N_EVENTO) +); +CREATE SEQUENCE SEQUENCE_N_EVENTO + START WITH 1 + INCREMENT BY 1; + +INSERT INTO CENTRO_UPS(ID,TIPO,DIRECCION) +VALUES(SEQUENCE_ID.NEXVAL,"CENTRO DE EMBALAJE","MARIANO ROQUE ALONSO"); + +INSERT INTO ARTICULOS(NRO_ARTICULOS,PESO,DIMENSION,IMPORTE,FECHA_FINAL,DESTINO) +VALUES(SEQUENCE_NRO_ARTICULOS.NEXVAL,8.3,"10X10CM",50000,'19/10/2021'); + +INSERT INTO ARTICULOS(NRO_ARTICULOS,PESO,DIMENSION,IMPORTE,FECHA_FINAL,DESTINO) +VALUES(SEQUENCE_NRO_ARTICULOS.NEXVAL,7.4,"5X10CM",80000,'28/10/2021'); + +INSERT INTO TRANSPORTE(N_EVENTO,TIPO,RUTA,DIRECCION) +VALUES(SEQUENCE_N_EVENTO.NEXVAL,"AUTOMOVIL","TRANSCHACO","MARIANO ROQUE ALONSO"); \ No newline at end of file diff --git b/box/Box.class a/box/Box.class new file mode 100644 index 0000000..e89dfa5 Binary files /dev/null and a/box/Box.class differ diff --git b/box/Box.java a/box/Box.java new file mode 100644 index 0000000..26b1805 --- /dev/null +++ a/box/Box.java @@ -0,0 +1,18 @@ +import java.util.concurrent.atomic.AtomicLong; + +public class Box{ + public float ancho; + public float alto; + public float profundidad; + public void box(){} + public void box(float ancho,float alto,float profundidad){ + this.ancho=ancho; + this.alto=alto; + this.profundidad=profundidad; + } + public void box(Box a){ + this.ancho=a.ancho; + this.alto=a.alto; + this.profundidad=a.profundidad; + } +} \ No newline at end of file diff --git b/box/BoxPeso.class a/box/BoxPeso.class new file mode 100644 index 0000000..89a9d57 Binary files /dev/null and a/box/BoxPeso.class differ diff --git b/box/BoxPeso.java a/box/BoxPeso.java new file mode 100644 index 0000000..1cec731 --- /dev/null +++ a/box/BoxPeso.java @@ -0,0 +1 @@ +public class BoxPeso{} \ No newline at end of file diff --git b/box/Envio.java a/box/Envio.java new file mode 100644 index 0000000..3cb4d24 --- /dev/null +++ a/box/Envio.java @@ -0,0 +1,12 @@ +public class Envio extends BoxPeso{ + public Envio(){ + + } + public Envio(float ancho,float peso){ + super(ancho,ancho, ancho,peso); + } + public Envio(float ancho,float alto, float profundidad, float peso){ + super(ancho, alto, profundidad, peso); + } + +} \ No newline at end of file diff --git b/factura/Factura.java a/factura/Factura.java new file mode 100644 index 0000000..7ef2133 --- /dev/null +++ a/factura/Factura.java @@ -0,0 +1,35 @@ +public class Factura{ + private static int iva1; + private static int iva2; + private int total; + public void setIva1(int iva){ + this.iva1=iva; + } + public void setIva2(int iva){ + this.iva2=iva; + } + public void setTotal(int total){ + this.total=total; + } + public int getIva1(){ + return iva1; + } + public int getIva2(){ + return iva2; + } + public int getTotal(){ + return total; + } + + public static void calcularIva(int total, int iva){ + System.out.println("el total del iva a pagar es de "+(double)(total)/(double)iva/100); + } + public static void main(String[] args) { + Factura F1=new Factura(); + F1.setIva1(10); + F1.setIva2(5); + F1.setTotal(100000); + calcularIva(total, f1.getIva1()); + + } +} \ No newline at end of file