Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
BootcampWebDia4
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Cesar Giulano Gonzalez Maqueda
BootcampWebDia4
Commits
d4b81f8a
Commit
d4b81f8a
authored
3 years ago
by
Cesar Giulano Gonzalez Maqueda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commit
parents
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
186 additions
and
0 deletions
+186
-0
Carteles/com/bootcamp20_10/carteles/Cartel.java
+23
-0
Carteles/com/bootcamp20_10/carteles/Circulo.java
+33
-0
Carteles/com/bootcamp20_10/carteles/Forma.java
+5
-0
Carteles/com/bootcamp20_10/carteles/Main.java
+14
-0
Carteles/com/bootcamp20_10/carteles/Rectangulo.java
+43
-0
Script-Dia4.sql
+68
-0
calculadora/calculadora.html
+0
-0
No files found.
Carteles/com/bootcamp20_10/carteles/Cartel.java
0 → 100644
View file @
d4b81f8a
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"
);
}
}
}
This diff is collapsed.
Click to expand it.
Carteles/com/bootcamp20_10/carteles/Circulo.java
0 → 100644
View file @
d4b81f8a
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
;
}
}
This diff is collapsed.
Click to expand it.
Carteles/com/bootcamp20_10/carteles/Forma.java
0 → 100644
View file @
d4b81f8a
package
com
.
bootcamp20_10
.
carteles
;
public
interface
Forma
{
public
boolean
cuadroFixText
(
String
text
);
}
This diff is collapsed.
Click to expand it.
Carteles/com/bootcamp20_10/carteles/Main.java
0 → 100644
View file @
d4b81f8a
package
com
.
bootcamp20_10
.
carteles
;
public
class
Main
{
public
static
void
main
(
String
[]
args
){
Forma
rectangulo
=
new
Rectangulo
(
10
f
,
5
f
,
"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
();
}
}
This diff is collapsed.
Click to expand it.
Carteles/com/bootcamp20_10/carteles/Rectangulo.java
0 → 100644
View file @
d4b81f8a
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
;
}
}
This diff is collapsed.
Click to expand it.
Script-Dia4.sql
0 → 100644
View file @
d4b81f8a
--Consulta todos los clientes que han alquilado pelculas
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 tambin por qu pelculas 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
;
--Cules son las categoras ms 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 categoras ms 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 ms 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
;
--Cul empleados son los mejores. Significa cual empleados se alquila maximo pelculas.
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
;
--Quin es el actor ms famoso. Significa pelculas 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 mximo?
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
;
This diff is collapsed.
Click to expand it.
calculadora/calculadora.html
0 → 100644
View file @
d4b81f8a
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment