-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'Prueba/Desarrollo' into MainPrueba
- Loading branch information
Showing
43 changed files
with
697 additions
and
0 deletions.
There are no files selected for viewing
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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 + '}'; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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><<Figura>> | ||
-- | ||
-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><<Triangulo>> | ||
-- | ||
-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><<Cuadrado>> | ||
-- | ||
-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=<<.</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=<<.</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=<. | ||
<<instanceOf>></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=<. | ||
<<instanceOf>></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=<<.</panel_attributes><additional_attributes>10;10;10;120</additional_attributes></element></diagram> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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><<Figura>> | ||
-- | ||
-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><<Triangulo>> | ||
-- | ||
-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><<Cuadrado>> | ||
-- | ||
-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=<<.</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=<<.</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=<. | ||
<<instanceOf>></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=<. | ||
<<instanceOf>></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=<<.</panel_attributes><additional_attributes>10;10;10;120</additional_attributes></element></diagram> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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><<Persona>> | ||
-- | ||
-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><<Empleado>> | ||
-- | ||
-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><<Cliente>> | ||
-- | ||
-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=<<.</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=()- | ||
<<extends>></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=()- | ||
<<extends>></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=<<..</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><<Empleado>> | ||
-- | ||
-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=<<..</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=<<..</panel_attributes><additional_attributes>10;10;10;70</additional_attributes></element></diagram> |
Binary file not shown.
Binary file added
BIN
+203 KB
TECNICATURA/JAVA/Clase9/Captura de pantalla 2024-10-14 a las 21.16.55.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
BIN
+108 KB
TECNICATURA/JAVA/Clase9/Captura de pantalla 2024-10-14 a las 21.17.08.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
BIN
+91.3 KB
TECNICATURA/JAVA/Clase9/Captura de pantalla 2024-10-14 a las 21.17.26.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
BIN
+165 KB
TECNICATURA/JAVA/Clase9/Captura de pantalla 2024-10-14 a las 21.17.39.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
BIN
+28 KB
TECNICATURA/JAVA/Clase9/Captura de pantalla 2024-10-14 a las 21.17.57.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
BIN
+126 KB
TECNICATURA/JAVA/Clase9/Captura de pantalla 2024-10-14 a las 21.19.33.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
5 changes: 5 additions & 0 deletions
5
TECNICATURA/JAVA/Clase9/Persona/.idea/codeStyles/codeStyleConfig.xml
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.