diff --git b/Carteles/com/bootcamp20_10/carteles/Cartel.java a/Carteles/com/bootcamp20_10/carteles/Cartel.java new file mode 100644 index 0000000..c2297aa --- /dev/null +++ a/Carteles/com/bootcamp20_10/carteles/Cartel.java @@ -0,0 +1,23 @@ +package com.bootcamp20_10.carteles; + +public class Cartel { + private Forma forma; + private String text; + + public Cartel(Forma forma, String text){ + this.forma = forma; + this.text = text; + } + + public void rellenarForma(){ + if(forma.cuadroFixText(this.text)){ + if(forma instanceof Rectangulo){ + System.out.println("Se a rellenado el cuadrado exitosamente."); + }else{ + System.out.println("Se a rellenado el circulo exitosamente."); + } + }else{ + System.out.println("No se a podido rellenar la forma, falta espacio"); + } + } +} diff --git b/Carteles/com/bootcamp20_10/carteles/Circulo.java a/Carteles/com/bootcamp20_10/carteles/Circulo.java new file mode 100644 index 0000000..5635204 --- /dev/null +++ a/Carteles/com/bootcamp20_10/carteles/Circulo.java @@ -0,0 +1,33 @@ +package com.bootcamp20_10.carteles; + +public class Circulo implements Forma{ + private float radio; + private String color; + + public Circulo(float radio, String color) { + this.radio = radio; + this.color = color; + } + + public float getRadio() { + return radio; + } + + public void setRadio(float radio) { + this.radio = radio; + } + + public String getColor() { + return color; + } + + public void setColor(String color) { + this.color = color; + } + + @Override + public boolean cuadroFixText(String text) { + System.out.println("Forma: Circulo\nEspacio: "+this.radio*2+"\nLongitud Texto: "+text.length()); + return text.length() <= radio*2; + } +} diff --git b/Carteles/com/bootcamp20_10/carteles/Forma.java a/Carteles/com/bootcamp20_10/carteles/Forma.java new file mode 100644 index 0000000..9013dfa --- /dev/null +++ a/Carteles/com/bootcamp20_10/carteles/Forma.java @@ -0,0 +1,5 @@ +package com.bootcamp20_10.carteles; + +public interface Forma { + public boolean cuadroFixText(String text); +} diff --git b/Carteles/com/bootcamp20_10/carteles/Main.java a/Carteles/com/bootcamp20_10/carteles/Main.java new file mode 100644 index 0000000..2128e5a --- /dev/null +++ a/Carteles/com/bootcamp20_10/carteles/Main.java @@ -0,0 +1,14 @@ +package com.bootcamp20_10.carteles; + +public class Main { + public static void main(String[] args){ + Forma rectangulo = new Rectangulo(10f, 5f, "Azul"); + Forma ciculo = new Circulo(9.2f, "Amarillo"); + + Cartel cartel1 = new Cartel(rectangulo, "Atencion Escuela"); + Cartel cartel2 = new Cartel(ciculo, "Atencion Escuela"); + + cartel1.rellenarForma(); + cartel2.rellenarForma(); + } +} diff --git b/Carteles/com/bootcamp20_10/carteles/Rectangulo.java a/Carteles/com/bootcamp20_10/carteles/Rectangulo.java new file mode 100644 index 0000000..fca0dd7 --- /dev/null +++ a/Carteles/com/bootcamp20_10/carteles/Rectangulo.java @@ -0,0 +1,43 @@ +package com.bootcamp20_10.carteles; + +public class Rectangulo implements Forma{ + private float longitud; + private float ancho; + private String color; + + public Rectangulo(float longitud, float ancho, String color){ + this.longitud = longitud; + this.ancho = ancho; + this.color = color; + } + + @Override + public boolean cuadroFixText(String text) { + System.out.println("Forma: Rectangulo\nEspacio: "+this.longitud+"\nLongitud Texto: "+text.length()); + return text.length() <= longitud; + } + + public float getLongitud() { + return longitud; + } + + public void setLongitud(float longitud) { + this.longitud = longitud; + } + + public float getAncho() { + return ancho; + } + + public void setAncho(float ancho) { + this.ancho = ancho; + } + + public String getColor() { + return color; + } + + public void setColor(String color) { + this.color = color; + } +} diff --git b/Script-Dia4.sql a/Script-Dia4.sql new file mode 100644 index 0000000..a786b05 --- /dev/null +++ a/Script-Dia4.sql @@ -0,0 +1,68 @@ + +--Consulta todos los clientes que han alquilado películas +select distinct c.customer_id, c.first_name, c.last_name +from customer c +right join rental r on r.customer_id = c.customer_id +order by c.customer_id desc; + +--Obtenga todos los clientes que hayan vencido la fecha de vencimiento de pago.Muestra también por qué películas vencen sus pagos. +select distinct f.film_id, c.customer_id, c.first_name, f.title from customer c +right join rental r on r.customer_id = r.customer_id +right join inventory i on i.inventory_id = r.inventory_id +right join film f on f.film_id = i.film_id +where r.return_date < current_date ; + +--¿Cuáles son las categorías más alquiladas? +select c.name, count(c.category_id) from category c +join film_category fc ON fc.category_id = c.category_id +join film f on f.film_id = fc.film_id +join inventory i on i.film_id = f.film_id +join rental r on r.inventory_id = i.inventory_id +group by(c.category_id) +order by count(c.category_id) desc; + +--Cuales son las categorías más alquiladas agrupadas por cliente. +select c2.customer_id, c2.first_name, c.name, count(c.category_id) from category c +join film_category fc ON fc.category_id = c.category_id +join film f on f.film_id = fc.film_id +join inventory i on i.film_id = f.film_id +join rental r on r.inventory_id = i.inventory_id +join customer c2 on r.customer_id = c2.customer_id +group by(c2.customer_id , c.category_id) +order by customer_id, count(c.category_id) desc; + +--Cual es el lenguaje más alquilado +select l.language_id, l.name, count(rental_id) from language l +join film f ON f.language_id = l.language_id +join inventory i on i.film_id = f.film_id +join rental r on r.inventory_id = i.inventory_id +group by (l.language_id) +order by count(r.rental_id) desc +limit 1; + +--Cuál empleados son los mejores. Significa cual empleados se alquila maximo películas. +select s.staff_id, s.first_name, count(r.rental_id) from staff s +join rental r on r.staff_id = s.staff_id +group by(s.staff_id) +order by count(r.rental_id) desc; + +--Quién es el actor más famoso. Significa películas de cual actor se alquila maximo. +select a.actor_id, a.first_name, a.last_name, count(r.rental_id) from actor a +join film_actor fa on fa.actor_id = a.actor_id +join film f on f.film_id = fa.film_id +join inventory i on i.film_id = f.film_id +join rental r on r.inventory_id = i.inventory_id +group by(a.actor_id) +order by count(r.rental_id) desc +limit 1; + +--Quien es el mejor cliente. ¿Significa quien alquila máximo? +select c.customer_id, c.first_name, c.last_name, count(r.rental_id) from customer c +join rental r on r.customer_id = c.customer_id +group by(c.customer_id) +order by count(r.rental_id) desc +limit 1; + + + + diff --git b/calculadora/calculadora.html a/calculadora/calculadora.html new file mode 100644 index 0000000..7e8078a --- /dev/null +++ a/calculadora/calculadora.html @@ -0,0 +1,324 @@ + + + + + + + Calculadora + + +
+ + + + + + +
/CE
+ + + + + + + + + + + + + + + + + + + + + + + + + +
789+
456-
123*
000.=
+
+ + +