Skip to content

Commit

Permalink
Merge branch 'Prueba/Desarrollo' into MainPrueba
Browse files Browse the repository at this point in the history
  • Loading branch information
MerAtim committed Oct 16, 2024
2 parents cbf48fa + 4a63060 commit 79f04e8
Show file tree
Hide file tree
Showing 43 changed files with 697 additions and 0 deletions.
Binary file added TECNICATURA/JAVA/Clase8/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added TECNICATURA/JAVA/Clase8/2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added TECNICATURA/JAVA/Clase8/3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added TECNICATURA/JAVA/Clase8/4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added TECNICATURA/JAVA/Clase8/5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added TECNICATURA/JAVA/Clase8/6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added TECNICATURA/JAVA/Clase8/7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
49 changes: 49 additions & 0 deletions TECNICATURA/JAVA/Clase8/Persona.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@

package domain;


public class Persona {

//Cargamos los atributos
private int idPersona;
private static int contadorPersona;
private String nombre;

//Constructor
public Persona(String nombre){
this.nombre = nombre;
//Incrementar el contador por cada objeto nuevo
Persona.contadorPersona++; //no utilizar el operador this
//vamos a asignar un nuevo valor a la variable idPersona
this.idPersona = Persona.contadorPersona;
}
public static int getContadorPersona() {
return contadorPersona;
}

public static void setContadorPersona(int aContadorPersona) {
contadorPersona = aContadorPersona;
}

public int getIdPersona() {
return this.idPersona;
}

public void setIdPersona(int idPersona) {
this.idPersona = idPersona;
}

public String getNombre() {
return this.nombre;
}

public void setNombre(String nombre) {
this.nombre = nombre;
}

@Override //esta notación agrega info extra al método que estamos definiendo
public String toString() {
return "Persona{" + "idPersona=" + idPersona + ", nombre=" + nombre + '}';
}

}
30 changes: 30 additions & 0 deletions TECNICATURA/JAVA/Clase8/PersonaPrueba.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@

package test;

import domain.Persona;


public class PersonaPrueba {
private int contador;

public static void main(String[] args) {
Persona persona1 = new Persona("Ariel");
System.out.println("persona1 = " + persona1);
Persona persona2 = new Persona("Naty");
System.out.println("persona2 = " + persona2);
imprimir(persona1);
imprimir(persona2);
//this.contador = 10; //no se puede referenciar desde un contexto estático
PersonaPrueba personaP1 = new PersonaPrueba();
System.out.println(personaP1.getContador());
}

public static void imprimir(Persona persona){
System.out.println("persona = " + persona);
}

public int getContador(){
imprimir(new Persona("Liliana"));
return this.contador;
}
}
43 changes: 43 additions & 0 deletions TECNICATURA/JAVA/Clase8/dominio/Persona.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*
*/
package dominio;


public class Persona {
//Atributos
private String nombre;
private double sueldo;
private boolean eliminado;

//Constructor
public Persona(String nombre, double sueldo, boolean eliminado){
this.nombre = nombre;
this.sueldo = sueldo;
this.eliminado = eliminado;
}

public String getNombre() {
return nombre;
}

public void setNombre(String nombre) {
this.nombre = nombre;
}

public double getSueldo() {
return sueldo;
}

public void setSueldo(double sueldo) {
this.sueldo = sueldo;
}

public boolean isEliminado() {
return eliminado;
}

public void setEliminado(boolean eliminado) {
this.eliminado = eliminado;
}
}
25 changes: 25 additions & 0 deletions TECNICATURA/JAVA/Clase8/dominio/herencia.uxf
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<diagram program="umletino" version="15.1"><zoom_level>10</zoom_level><element><id>UMLClass</id><coordinates><x>220</x><y>50</y><w>210</w><h>80</h></coordinates><panel_attributes>&lt;&lt;Figura&gt;&gt;
--
-nLados: int
--
Figura (int nLados)
getNLados(): int
</panel_attributes><additional_attributes></additional_attributes></element><element><id>UMLClass</id><coordinates><x>10</x><y>310</y><w>210</w><h>110</h></coordinates><panel_attributes>&lt;&lt;Triangulo&gt;&gt;
--
-nLados: int
-l1, l2, l3 : float
--
Triangulo (int nLados)
getNLados (): int
area Triangulo (): float
</panel_attributes><additional_attributes></additional_attributes></element><element><id>UMLClass</id><coordinates><x>430</x><y>310</y><w>210</w><h>110</h></coordinates><panel_attributes>&lt;&lt;Cuadrado&gt;&gt;
--
-nLados : int
-lado : float
--
Cuadrado (int nLados)
getNLados (): int
area Cuadrado (): float
</panel_attributes><additional_attributes></additional_attributes></element><element><id>Relation</id><coordinates><x>100</x><y>250</y><w>30</w><h>80</h></coordinates><panel_attributes>lt=&lt;&lt;.</panel_attributes><additional_attributes>10;10;10;60</additional_attributes></element><element><id>Relation</id><coordinates><x>510</x><y>250</y><w>30</w><h>90</h></coordinates><panel_attributes>lt=&lt;&lt;.</panel_attributes><additional_attributes>10;10;10;70</additional_attributes></element><element><id>Relation</id><coordinates><x>320</x><y>240</y><w>220</w><h>40</h></coordinates><panel_attributes>lt=&lt;.
&lt;&lt;instanceOf&gt;&gt;</panel_attributes><additional_attributes>10;20;200;20</additional_attributes></element><element><id>Relation</id><coordinates><x>100</x><y>240</y><w>250</w><h>40</h></coordinates><panel_attributes>lt=&lt;.
&lt;&lt;instanceOf&gt;&gt;</panel_attributes><additional_attributes>230;20;10;20</additional_attributes></element><element><id>Relation</id><coordinates><x>320</x><y>130</y><w>30</w><h>140</h></coordinates><panel_attributes>lt=&lt;&lt;.</panel_attributes><additional_attributes>10;10;10;120</additional_attributes></element></diagram>
25 changes: 25 additions & 0 deletions TECNICATURA/JAVA/Clase8/herencia.uxf
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<diagram program="umletino" version="15.1"><zoom_level>10</zoom_level><element><id>UMLClass</id><coordinates><x>220</x><y>50</y><w>210</w><h>80</h></coordinates><panel_attributes>&lt;&lt;Figura&gt;&gt;
--
-nLados: int
--
Figura (int nLados)
getNLados(): int
</panel_attributes><additional_attributes></additional_attributes></element><element><id>UMLClass</id><coordinates><x>10</x><y>310</y><w>210</w><h>110</h></coordinates><panel_attributes>&lt;&lt;Triangulo&gt;&gt;
--
-nLados: int
-l1, l2, l3 : float
--
Triangulo (int nLados)
getNLados (): int
area Triangulo (): float
</panel_attributes><additional_attributes></additional_attributes></element><element><id>UMLClass</id><coordinates><x>430</x><y>310</y><w>210</w><h>110</h></coordinates><panel_attributes>&lt;&lt;Cuadrado&gt;&gt;
--
-nLados : int
-lado : float
--
Cuadrado (int nLados)
getNLados (): int
area Cuadrado (): float
</panel_attributes><additional_attributes></additional_attributes></element><element><id>Relation</id><coordinates><x>100</x><y>250</y><w>30</w><h>80</h></coordinates><panel_attributes>lt=&lt;&lt;.</panel_attributes><additional_attributes>10;10;10;60</additional_attributes></element><element><id>Relation</id><coordinates><x>510</x><y>250</y><w>30</w><h>90</h></coordinates><panel_attributes>lt=&lt;&lt;.</panel_attributes><additional_attributes>10;10;10;70</additional_attributes></element><element><id>Relation</id><coordinates><x>320</x><y>240</y><w>220</w><h>40</h></coordinates><panel_attributes>lt=&lt;.
&lt;&lt;instanceOf&gt;&gt;</panel_attributes><additional_attributes>10;20;200;20</additional_attributes></element><element><id>Relation</id><coordinates><x>100</x><y>240</y><w>250</w><h>40</h></coordinates><panel_attributes>lt=&lt;.
&lt;&lt;instanceOf&gt;&gt;</panel_attributes><additional_attributes>230;20;10;20</additional_attributes></element><element><id>Relation</id><coordinates><x>320</x><y>130</y><w>30</w><h>140</h></coordinates><panel_attributes>lt=&lt;&lt;.</panel_attributes><additional_attributes>10;10;10;120</additional_attributes></element></diagram>
42 changes: 42 additions & 0 deletions TECNICATURA/JAVA/Clase8/herencia1.uxf
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<diagram program="umletino" version="15.1"><zoom_level>10</zoom_level><element><id>UMLClass</id><coordinates><x>350</x><y>10</y><w>210</w><h>210</h></coordinates><panel_attributes>&lt;&lt;Persona&gt;&gt;
--
-nombre: String
-genero: char
-edad: int
-direccion: String
--
+getNombre(): Str
+setNombre(String): void
+getGenero():char
+setGenero(char): void
+getEdad(): int
+setEdad(int): void
+getDireccion(): String
+setDireccion(String): void</panel_attributes><additional_attributes></additional_attributes></element><element><id>UMLClass</id><coordinates><x>50</x><y>380</y><w>210</w><h>110</h></coordinates><panel_attributes>&lt;&lt;Empleado&gt;&gt;
--
-idEmpleado: int
-sueldo: double
--
+getIdEmpleado(): int
+getSueldo(): double
+setSueldo(double): void</panel_attributes><additional_attributes></additional_attributes></element><element><id>UMLClass</id><coordinates><x>620</x><y>380</y><w>210</w><h>160</h></coordinates><panel_attributes>&lt;&lt;Cliente&gt;&gt;
--
-idCliente: int
-fechaRegistro: Date
vip: boolean
--
+getIdCliente(): int
+getFechaRegistro(): Date
+setFechaRegistro(Date): void
+idVip(): boolean
+setVip(boolean): void
</panel_attributes><additional_attributes></additional_attributes></element><element><id>Relation</id><coordinates><x>1220</x><y>150</y><w>190</w><h>30</h></coordinates><panel_attributes>lt=&lt;&lt;.</panel_attributes><additional_attributes>10;10;170;10</additional_attributes></element><element><id>Relation</id><coordinates><x>130</x><y>260</y><w>330</w><h>40</h></coordinates><panel_attributes>lt=()-
&lt;&lt;extends&gt;&gt;</panel_attributes><additional_attributes>10;20;310;20</additional_attributes></element><element><id>Relation</id><coordinates><x>430</x><y>260</y><w>310</w><h>40</h></coordinates><panel_attributes>lt=()-
&lt;&lt;extends&gt;&gt;</panel_attributes><additional_attributes>290;20;10;20</additional_attributes></element><element><id>Relation</id><coordinates><x>710</x><y>270</y><w>30</w><h>130</h></coordinates><panel_attributes>lt=&lt;&lt;..</panel_attributes><additional_attributes>10;10;10;110</additional_attributes></element><element><id>UMLClass</id><coordinates><x>50</x><y>380</y><w>210</w><h>110</h></coordinates><panel_attributes>&lt;&lt;Empleado&gt;&gt;
--
-idEmpleado: int
-sueldo: double
--
+getIdEmpleado(): int
+getSueldo(): double
+setSueldo(double): void</panel_attributes><additional_attributes></additional_attributes></element><element><id>Relation</id><coordinates><x>130</x><y>270</y><w>30</w><h>130</h></coordinates><panel_attributes>lt=&lt;&lt;..</panel_attributes><additional_attributes>10;10;10;110</additional_attributes></element><element><id>Relation</id><coordinates><x>440</x><y>210</y><w>30</w><h>90</h></coordinates><panel_attributes>lt=&lt;&lt;..</panel_attributes><additional_attributes>10;10;10;70</additional_attributes></element></diagram>
Binary file added TECNICATURA/JAVA/Clase9/.DS_Store
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 29 additions & 0 deletions TECNICATURA/JAVA/Clase9/Persona/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
### IntelliJ IDEA ###
out/
!**/src/main/**/out/
!**/src/test/**/out/

### Eclipse ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
bin/
!**/src/main/**/bin/
!**/src/test/**/bin/

### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/

### VS Code ###
.vscode/

### Mac OS ###
.DS_Store
3 changes: 3 additions & 0 deletions TECNICATURA/JAVA/Clase9/Persona/.idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions TECNICATURA/JAVA/Clase9/Persona/.idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions TECNICATURA/JAVA/Clase9/Persona/.idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions TECNICATURA/JAVA/Clase9/Persona/.idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 79f04e8

Please sign in to comment.