├── BodyMeterUMLDiagrams
└── umlproject
├── BodyMeter
├── nbproject
│ ├── private
│ │ ├── config.properties
│ │ ├── private.properties
│ │ └── private.xml
│ ├── genfiles.properties
│ ├── project.xml
│ └── project.properties
├── manifest.mf
├── dist
│ ├── BodyMeter.jar
│ ├── BodyMeter
│ │ ├── BodyMeter.jar
│ │ ├── Measurements.txt
│ │ ├── login.txt
│ │ ├── README.TXT
│ │ └── userProfile.txt
│ ├── lib
│ │ └── jcalendar-1.4.jar.zip
│ ├── Measurements.txt
│ ├── login.txt
│ ├── README.TXT
│ └── userProfile.txt
├── build
│ ├── classes
│ │ ├── data
│ │ │ ├── User.class
│ │ │ ├── Patient.class
│ │ │ └── Nutritionist.class
│ │ ├── UI
│ │ │ ├── LoginScreen.class
│ │ │ ├── LoginScreen$1.class
│ │ │ ├── LoginScreen$2.class
│ │ │ ├── LoginScreen$3.class
│ │ │ ├── LoginScreen$4.class
│ │ │ ├── LoginScreen$5.class
│ │ │ ├── EditUserProfile.class
│ │ │ ├── EditUserProfile$1.class
│ │ │ ├── EditUserProfile$10.class
│ │ │ ├── EditUserProfile$11.class
│ │ │ ├── EditUserProfile$12.class
│ │ │ ├── EditUserProfile$13.class
│ │ │ ├── EditUserProfile$14.class
│ │ │ ├── EditUserProfile$15.class
│ │ │ ├── EditUserProfile$16.class
│ │ │ ├── EditUserProfile$17.class
│ │ │ ├── EditUserProfile$18.class
│ │ │ ├── EditUserProfile$19.class
│ │ │ ├── EditUserProfile$2.class
│ │ │ ├── EditUserProfile$20.class
│ │ │ ├── EditUserProfile$21.class
│ │ │ ├── EditUserProfile$22.class
│ │ │ ├── EditUserProfile$23.class
│ │ │ ├── EditUserProfile$24.class
│ │ │ ├── EditUserProfile$25.class
│ │ │ ├── EditUserProfile$26.class
│ │ │ ├── EditUserProfile$27.class
│ │ │ ├── EditUserProfile$28.class
│ │ │ ├── EditUserProfile$29.class
│ │ │ ├── EditUserProfile$3.class
│ │ │ ├── EditUserProfile$30.class
│ │ │ ├── EditUserProfile$4.class
│ │ │ ├── EditUserProfile$5.class
│ │ │ ├── EditUserProfile$6.class
│ │ │ ├── EditUserProfile$7.class
│ │ │ ├── EditUserProfile$8.class
│ │ │ ├── EditUserProfile$9.class
│ │ │ ├── TakeMeassurements.class
│ │ │ ├── UserRegisterScreen.class
│ │ │ ├── TakeMeassurements$1.class
│ │ │ ├── TakeMeassurements$2.class
│ │ │ ├── TakeMeassurements$3.class
│ │ │ ├── TakeMeassurements$4.class
│ │ │ ├── TakeMeassurements$5.class
│ │ │ ├── TakeMeassurements$6.class
│ │ │ ├── TakeMeassurements$7.class
│ │ │ ├── TakeMeassurements$8.class
│ │ │ ├── UserRegisterScreen$1.class
│ │ │ ├── UserRegisterScreen$10.class
│ │ │ ├── UserRegisterScreen$11.class
│ │ │ ├── UserRegisterScreen$12.class
│ │ │ ├── UserRegisterScreen$13.class
│ │ │ ├── UserRegisterScreen$14.class
│ │ │ ├── UserRegisterScreen$15.class
│ │ │ ├── UserRegisterScreen$16.class
│ │ │ ├── UserRegisterScreen$17.class
│ │ │ ├── UserRegisterScreen$18.class
│ │ │ ├── UserRegisterScreen$19.class
│ │ │ ├── UserRegisterScreen$2.class
│ │ │ ├── UserRegisterScreen$20.class
│ │ │ ├── UserRegisterScreen$21.class
│ │ │ ├── UserRegisterScreen$22.class
│ │ │ ├── UserRegisterScreen$23.class
│ │ │ ├── UserRegisterScreen$24.class
│ │ │ ├── UserRegisterScreen$25.class
│ │ │ ├── UserRegisterScreen$26.class
│ │ │ ├── UserRegisterScreen$27.class
│ │ │ ├── UserRegisterScreen$28.class
│ │ │ ├── UserRegisterScreen$29.class
│ │ │ ├── UserRegisterScreen$3.class
│ │ │ ├── UserRegisterScreen$4.class
│ │ │ ├── UserRegisterScreen$5.class
│ │ │ ├── UserRegisterScreen$6.class
│ │ │ ├── UserRegisterScreen$7.class
│ │ │ ├── UserRegisterScreen$8.class
│ │ │ ├── UserRegisterScreen$9.class
│ │ │ ├── PatientPrincipalScreen.class
│ │ │ ├── PatientPrincipalScreen$1.class
│ │ │ ├── PatientPrincipalScreen$2.class
│ │ │ ├── NutritionistPrincipalScreen.class
│ │ │ ├── NutritionistPrincipalScreen$1.class
│ │ │ ├── NutritionistPrincipalScreen$2.class
│ │ │ ├── NutritionistPrincipalScreen$3.class
│ │ │ ├── NutritionistPrincipalScreen$4.class
│ │ │ ├── NutritionistPrincipalScreen$5.class
│ │ │ ├── NutritionistPrincipalScreen$6.class
│ │ │ ├── NutritionistPrincipalScreen$7.class
│ │ │ ├── NutritionistPrincipalScreen$8.class
│ │ │ └── NutritionistPrincipalScreen$9.class
│ │ ├── logicBusiness
│ │ │ ├── Login.class
│ │ │ ├── ExportData.class
│ │ │ ├── BodymeterMainManager.class
│ │ │ ├── BodymeterUIManager.class
│ │ │ ├── CalculateAnthropometry.class
│ │ │ └── AnthropometricMeasurement.class
│ │ └── resources
│ │ │ ├── img
│ │ │ ├── icono.jpg
│ │ │ ├── logotipoH.jpg
│ │ │ ├── logotipoV.jpg
│ │ │ ├── ubicador.jpg
│ │ │ └── Somatotipo.jpg
│ │ │ └── base
│ │ │ ├── Measurements.txt
│ │ │ ├── login.txt
│ │ │ ├── control - login.txt
│ │ │ ├── userProfile.txt
│ │ │ └── control - userProfile.txt
│ └── built-jar.properties
├── src
│ ├── resources
│ │ ├── img
│ │ │ ├── icono.jpg
│ │ │ ├── logotipoH.jpg
│ │ │ ├── logotipoV.jpg
│ │ │ ├── ubicador.jpg
│ │ │ └── Somatotipo.jpg
│ │ └── base
│ │ │ ├── Measurements.txt
│ │ │ ├── login.txt
│ │ │ ├── control - login.txt
│ │ │ ├── userProfile.txt
│ │ │ └── control - userProfile.txt
│ ├── logicBusiness
│ │ ├── BodymeterUIManager.java
│ │ ├── ExportData.java
│ │ ├── BodymeterMainManager.java
│ │ ├── Login.java
│ │ └── CalculateAnthropometry.java
│ ├── data
│ │ ├── Nutritionist.java
│ │ ├── Patient.java
│ │ └── User.java
│ └── UI
│ │ ├── LoginScreen.form
│ │ ├── PatientPrincipalScreen.form
│ │ ├── PatientPrincipalScreen.java
│ │ └── LoginScreen.java
├── Measurements.txt
├── login.txt
├── control - login.txt
├── userProfile.txt
├── control - userProfile.txt
└── build.xml
└── README.md
/BodyMeterUMLDiagrams/umlproject:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/BodyMeter/nbproject/private/config.properties:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/BodyMeter/manifest.mf:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | X-COMMENT: Main-Class will be added automatically by build
3 |
4 |
--------------------------------------------------------------------------------
/BodyMeter/dist/BodyMeter.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/dist/BodyMeter.jar
--------------------------------------------------------------------------------
/BodyMeter/build/classes/data/User.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/data/User.class
--------------------------------------------------------------------------------
/BodyMeter/dist/BodyMeter/BodyMeter.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/dist/BodyMeter/BodyMeter.jar
--------------------------------------------------------------------------------
/BodyMeter/src/resources/img/icono.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/src/resources/img/icono.jpg
--------------------------------------------------------------------------------
/BodyMeter/dist/lib/jcalendar-1.4.jar.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/dist/lib/jcalendar-1.4.jar.zip
--------------------------------------------------------------------------------
/BodyMeter/src/resources/img/logotipoH.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/src/resources/img/logotipoH.jpg
--------------------------------------------------------------------------------
/BodyMeter/src/resources/img/logotipoV.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/src/resources/img/logotipoV.jpg
--------------------------------------------------------------------------------
/BodyMeter/src/resources/img/ubicador.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/src/resources/img/ubicador.jpg
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # ProyectoPooAnonymous
2 | Proyecto final de programación orientada a objetos con Java, curso de la Universidad Nacional de Colombia
3 |
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/LoginScreen.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/LoginScreen.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/data/Patient.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/data/Patient.class
--------------------------------------------------------------------------------
/BodyMeter/src/resources/img/Somatotipo.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/src/resources/img/Somatotipo.jpg
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/LoginScreen$1.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/LoginScreen$1.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/LoginScreen$2.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/LoginScreen$2.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/LoginScreen$3.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/LoginScreen$3.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/LoginScreen$4.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/LoginScreen$4.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/LoginScreen$5.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/LoginScreen$5.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/EditUserProfile.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/EditUserProfile.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/data/Nutritionist.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/data/Nutritionist.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/logicBusiness/Login.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/logicBusiness/Login.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/resources/img/icono.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/resources/img/icono.jpg
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/EditUserProfile$1.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/EditUserProfile$1.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/EditUserProfile$10.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/EditUserProfile$10.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/EditUserProfile$11.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/EditUserProfile$11.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/EditUserProfile$12.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/EditUserProfile$12.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/EditUserProfile$13.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/EditUserProfile$13.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/EditUserProfile$14.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/EditUserProfile$14.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/EditUserProfile$15.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/EditUserProfile$15.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/EditUserProfile$16.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/EditUserProfile$16.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/EditUserProfile$17.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/EditUserProfile$17.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/EditUserProfile$18.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/EditUserProfile$18.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/EditUserProfile$19.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/EditUserProfile$19.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/EditUserProfile$2.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/EditUserProfile$2.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/EditUserProfile$20.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/EditUserProfile$20.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/EditUserProfile$21.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/EditUserProfile$21.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/EditUserProfile$22.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/EditUserProfile$22.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/EditUserProfile$23.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/EditUserProfile$23.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/EditUserProfile$24.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/EditUserProfile$24.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/EditUserProfile$25.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/EditUserProfile$25.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/EditUserProfile$26.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/EditUserProfile$26.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/EditUserProfile$27.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/EditUserProfile$27.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/EditUserProfile$28.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/EditUserProfile$28.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/EditUserProfile$29.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/EditUserProfile$29.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/EditUserProfile$3.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/EditUserProfile$3.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/EditUserProfile$30.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/EditUserProfile$30.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/EditUserProfile$4.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/EditUserProfile$4.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/EditUserProfile$5.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/EditUserProfile$5.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/EditUserProfile$6.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/EditUserProfile$6.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/EditUserProfile$7.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/EditUserProfile$7.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/EditUserProfile$8.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/EditUserProfile$8.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/EditUserProfile$9.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/EditUserProfile$9.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/TakeMeassurements.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/TakeMeassurements.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/UserRegisterScreen.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/UserRegisterScreen.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/resources/img/logotipoH.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/resources/img/logotipoH.jpg
--------------------------------------------------------------------------------
/BodyMeter/build/classes/resources/img/logotipoV.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/resources/img/logotipoV.jpg
--------------------------------------------------------------------------------
/BodyMeter/build/classes/resources/img/ubicador.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/resources/img/ubicador.jpg
--------------------------------------------------------------------------------
/BodyMeter/build/built-jar.properties:
--------------------------------------------------------------------------------
1 | #Mon, 22 Jul 2019 16:18:59 -0500
2 |
3 |
4 | C\:\\Users\\Usuario\\Documents\\NetBeansProjects\\ProyectoPooAnonymous\\BodyMeter=
5 |
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/TakeMeassurements$1.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/TakeMeassurements$1.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/TakeMeassurements$2.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/TakeMeassurements$2.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/TakeMeassurements$3.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/TakeMeassurements$3.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/TakeMeassurements$4.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/TakeMeassurements$4.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/TakeMeassurements$5.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/TakeMeassurements$5.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/TakeMeassurements$6.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/TakeMeassurements$6.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/TakeMeassurements$7.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/TakeMeassurements$7.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/TakeMeassurements$8.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/TakeMeassurements$8.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/UserRegisterScreen$1.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/UserRegisterScreen$1.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/UserRegisterScreen$10.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/UserRegisterScreen$10.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/UserRegisterScreen$11.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/UserRegisterScreen$11.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/UserRegisterScreen$12.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/UserRegisterScreen$12.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/UserRegisterScreen$13.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/UserRegisterScreen$13.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/UserRegisterScreen$14.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/UserRegisterScreen$14.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/UserRegisterScreen$15.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/UserRegisterScreen$15.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/UserRegisterScreen$16.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/UserRegisterScreen$16.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/UserRegisterScreen$17.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/UserRegisterScreen$17.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/UserRegisterScreen$18.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/UserRegisterScreen$18.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/UserRegisterScreen$19.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/UserRegisterScreen$19.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/UserRegisterScreen$2.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/UserRegisterScreen$2.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/UserRegisterScreen$20.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/UserRegisterScreen$20.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/UserRegisterScreen$21.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/UserRegisterScreen$21.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/UserRegisterScreen$22.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/UserRegisterScreen$22.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/UserRegisterScreen$23.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/UserRegisterScreen$23.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/UserRegisterScreen$24.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/UserRegisterScreen$24.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/UserRegisterScreen$25.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/UserRegisterScreen$25.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/UserRegisterScreen$26.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/UserRegisterScreen$26.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/UserRegisterScreen$27.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/UserRegisterScreen$27.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/UserRegisterScreen$28.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/UserRegisterScreen$28.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/UserRegisterScreen$29.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/UserRegisterScreen$29.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/UserRegisterScreen$3.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/UserRegisterScreen$3.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/UserRegisterScreen$4.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/UserRegisterScreen$4.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/UserRegisterScreen$5.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/UserRegisterScreen$5.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/UserRegisterScreen$6.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/UserRegisterScreen$6.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/UserRegisterScreen$7.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/UserRegisterScreen$7.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/UserRegisterScreen$8.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/UserRegisterScreen$8.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/UserRegisterScreen$9.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/UserRegisterScreen$9.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/logicBusiness/ExportData.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/logicBusiness/ExportData.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/resources/img/Somatotipo.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/resources/img/Somatotipo.jpg
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/PatientPrincipalScreen.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/PatientPrincipalScreen.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/PatientPrincipalScreen$1.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/PatientPrincipalScreen$1.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/PatientPrincipalScreen$2.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/PatientPrincipalScreen$2.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/NutritionistPrincipalScreen.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/NutritionistPrincipalScreen.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/NutritionistPrincipalScreen$1.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/NutritionistPrincipalScreen$1.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/NutritionistPrincipalScreen$2.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/NutritionistPrincipalScreen$2.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/NutritionistPrincipalScreen$3.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/NutritionistPrincipalScreen$3.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/NutritionistPrincipalScreen$4.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/NutritionistPrincipalScreen$4.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/NutritionistPrincipalScreen$5.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/NutritionistPrincipalScreen$5.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/NutritionistPrincipalScreen$6.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/NutritionistPrincipalScreen$6.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/NutritionistPrincipalScreen$7.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/NutritionistPrincipalScreen$7.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/NutritionistPrincipalScreen$8.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/NutritionistPrincipalScreen$8.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/UI/NutritionistPrincipalScreen$9.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/UI/NutritionistPrincipalScreen$9.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/logicBusiness/BodymeterMainManager.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/logicBusiness/BodymeterMainManager.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/logicBusiness/BodymeterUIManager.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/logicBusiness/BodymeterUIManager.class
--------------------------------------------------------------------------------
/BodyMeter/Measurements.txt:
--------------------------------------------------------------------------------
1 | 64.0 171.0 89.0 165.5 8.0 13.0 4.5 12.0 6.5 10.0 13.0 6.0 0.0 58.8 35.8 29.8 32.0 26.7 16.3 96.3 73.4 75.0 89.5 50.5 50.9 34.5 22.3 41.0 19.4 25.6 28.3 20.6 7.1 5.6 10.2
--------------------------------------------------------------------------------
/BodyMeter/build/classes/logicBusiness/CalculateAnthropometry.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/logicBusiness/CalculateAnthropometry.class
--------------------------------------------------------------------------------
/BodyMeter/build/classes/logicBusiness/AnthropometricMeasurement.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JuliansCastro/ProyectoPooJava/HEAD/BodyMeter/build/classes/logicBusiness/AnthropometricMeasurement.class
--------------------------------------------------------------------------------
/BodyMeter/dist/Measurements.txt:
--------------------------------------------------------------------------------
1 | 64.0 171.0 89.0 165.5 8.0 13.0 4.5 12.0 6.5 10.0 13.0 6.0 0.0 58.8 35.8 29.8 32.0 26.7 16.3 96.3 73.4 75.0 89.5 50.5 50.9 34.5 22.3 41.0 19.4 25.6 28.3 20.6 7.1 5.6 10.2
--------------------------------------------------------------------------------
/BodyMeter/dist/BodyMeter/Measurements.txt:
--------------------------------------------------------------------------------
1 | 64.0 171.0 89.0 165.5 8.0 13.0 4.5 12.0 6.5 10.0 13.0 6.0 0.0 58.8 35.8 29.8 32.0 26.7 16.3 96.3 73.4 75.0 89.5 50.5 50.9 34.5 22.3 41.0 19.4 25.6 28.3 20.6 7.1 5.6 10.2
--------------------------------------------------------------------------------
/BodyMeter/src/resources/base/Measurements.txt:
--------------------------------------------------------------------------------
1 | 64.0 171.0 89.0 165.5 8.0 13.0 4.5 12.0 6.5 10.0 13.0 6.0 0.0 58.8 35.8 29.8 32.0 26.7 16.3 96.3 73.4 75.0 89.5 50.5 50.9 34.5 22.3 41.0 19.4 25.6 28.3 20.6 7.1 5.6 10.2
--------------------------------------------------------------------------------
/BodyMeter/build/classes/resources/base/Measurements.txt:
--------------------------------------------------------------------------------
1 | 64.0 171.0 89.0 165.5 8.0 13.0 4.5 12.0 6.5 10.0 13.0 6.0 0.0 58.8 35.8 29.8 32.0 26.7 16.3 96.3 73.4 75.0 89.5 50.5 50.9 34.5 22.3 41.0 19.4 25.6 28.3 20.6 7.1 5.6 10.2
--------------------------------------------------------------------------------
/BodyMeter/nbproject/private/private.properties:
--------------------------------------------------------------------------------
1 | compile.on.save=true
2 | do.depend=false
3 | do.jar=true
4 | javac.debug=true
5 | javadoc.preview=true
6 | user.properties.file=C:\\Users\\Usuario\\AppData\\Roaming\\NetBeans\\8.2\\build.properties
7 |
--------------------------------------------------------------------------------
/BodyMeter/nbproject/genfiles.properties:
--------------------------------------------------------------------------------
1 | build.xml.data.CRC32=593132ec
2 | build.xml.script.CRC32=58c90b0a
3 | build.xml.stylesheet.CRC32=8064a381@1.80.1.48
4 | # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
5 | # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
6 | nbproject/build-impl.xml.data.CRC32=593132ec
7 | nbproject/build-impl.xml.script.CRC32=6358e03b
8 | nbproject/build-impl.xml.stylesheet.CRC32=830a3534@1.80.1.48
9 |
--------------------------------------------------------------------------------
/BodyMeter/nbproject/project.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | org.netbeans.modules.java.j2seproject
4 |
5 |
6 | BodyMeter
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/BodyMeter/src/logicBusiness/BodymeterUIManager.java:
--------------------------------------------------------------------------------
1 | package logicBusiness;
2 |
3 | import UI.LoginScreen;
4 |
5 | /*
6 | import java.awt.Image;
7 |
8 | import java.io.File;
9 | import java.util.ArrayList;
10 | import javax.swing.ImageIcon;
11 | import javax.swing.JFrame;
12 | */
13 |
14 | /*
15 | * @author ANONYMOUS
16 | * @author JULIAN C
17 | * @author DANIEL R
18 | * @author JUAN B
19 | */
20 | public class BodymeterUIManager {
21 |
22 | static public void showLoginScreen() {
23 | javax.swing.SwingUtilities.invokeLater(() -> {
24 | new LoginScreen().setVisible(true);
25 | });
26 | }
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/BodyMeter/login.txt:
--------------------------------------------------------------------------------
1 | [-23, -42, -21, 124, -21, -26, -87, -93, 80, -112, 117, 47, 10, 60, -2, -40] [12, -68, -68, 26, 53, -109, 111, -46, 74, -124, 116, -124, 98, 99, -43, 120] [32, -118, 85, -39, -91, -106, -46, -88, 127, 30, 78, -15, 24, -71, -63, -1]
2 | [-53, 59, -70, 89, 76, -53, 31, -100, -117, 78, -40, -14, 66, -12, -15, -71] [-4, -16, -28, 84, -123, 119, -124, 5, -102, 38, 112, -71, 39, 72, 5, -10] [35, 77, 49, 109, 73, -68, 81, 82, -106, -107, -4, -45, 22, 16, -89, -34]
3 | [34, 108, 14, -16, -125, 94, 120, 123, -71, -52, 40, 75, 95, -19, -11, -64] [-4, -16, -28, 84, -123, 119, -124, 5, -102, 38, 112, -71, 39, 72, 5, -10] [17, -11, 94, -32, 42, -54, 63, -59, 111, 52, -53, -69, 97, -114, 56, -17]
4 |
--------------------------------------------------------------------------------
/BodyMeter/dist/login.txt:
--------------------------------------------------------------------------------
1 | [-23, -42, -21, 124, -21, -26, -87, -93, 80, -112, 117, 47, 10, 60, -2, -40] [12, -68, -68, 26, 53, -109, 111, -46, 74, -124, 116, -124, 98, 99, -43, 120] [32, -118, 85, -39, -91, -106, -46, -88, 127, 30, 78, -15, 24, -71, -63, -1]
2 | [-53, 59, -70, 89, 76, -53, 31, -100, -117, 78, -40, -14, 66, -12, -15, -71] [-4, -16, -28, 84, -123, 119, -124, 5, -102, 38, 112, -71, 39, 72, 5, -10] [35, 77, 49, 109, 73, -68, 81, 82, -106, -107, -4, -45, 22, 16, -89, -34]
3 | [34, 108, 14, -16, -125, 94, 120, 123, -71, -52, 40, 75, 95, -19, -11, -64] [-4, -16, -28, 84, -123, 119, -124, 5, -102, 38, 112, -71, 39, 72, 5, -10] [17, -11, 94, -32, 42, -54, 63, -59, 111, 52, -53, -69, 97, -114, 56, -17]
4 |
--------------------------------------------------------------------------------
/BodyMeter/control - login.txt:
--------------------------------------------------------------------------------
1 | [-23, -42, -21, 124, -21, -26, -87, -93, 80, -112, 117, 47, 10, 60, -2, -40] [12, -68, -68, 26, 53, -109, 111, -46, 74, -124, 116, -124, 98, 99, -43, 120] [32, -118, 85, -39, -91, -106, -46, -88, 127, 30, 78, -15, 24, -71, -63, -1]
2 | [-53, 59, -70, 89, 76, -53, 31, -100, -117, 78, -40, -14, 66, -12, -15, -71] [-4, -16, -28, 84, -123, 119, -124, 5, -102, 38, 112, -71, 39, 72, 5, -10] [35, 77, 49, 109, 73, -68, 81, 82, -106, -107, -4, -45, 22, 16, -89, -34]
3 | [34, 108, 14, -16, -125, 94, 120, 123, -71, -52, 40, 75, 95, -19, -11, -64] [-4, -16, -28, 84, -123, 119, -124, 5, -102, 38, 112, -71, 39, 72, 5, -10] [17, -11, 94, -32, 42, -54, 63, -59, 111, 52, -53, -69, 97, -114, 56, -17]
4 |
--------------------------------------------------------------------------------
/BodyMeter/dist/BodyMeter/login.txt:
--------------------------------------------------------------------------------
1 | [-23, -42, -21, 124, -21, -26, -87, -93, 80, -112, 117, 47, 10, 60, -2, -40] [12, -68, -68, 26, 53, -109, 111, -46, 74, -124, 116, -124, 98, 99, -43, 120] [32, -118, 85, -39, -91, -106, -46, -88, 127, 30, 78, -15, 24, -71, -63, -1]
2 | [-53, 59, -70, 89, 76, -53, 31, -100, -117, 78, -40, -14, 66, -12, -15, -71] [-4, -16, -28, 84, -123, 119, -124, 5, -102, 38, 112, -71, 39, 72, 5, -10] [35, 77, 49, 109, 73, -68, 81, 82, -106, -107, -4, -45, 22, 16, -89, -34]
3 | [34, 108, 14, -16, -125, 94, 120, 123, -71, -52, 40, 75, 95, -19, -11, -64] [-4, -16, -28, 84, -123, 119, -124, 5, -102, 38, 112, -71, 39, 72, 5, -10] [17, -11, 94, -32, 42, -54, 63, -59, 111, 52, -53, -69, 97, -114, 56, -17]
4 |
--------------------------------------------------------------------------------
/BodyMeter/src/resources/base/login.txt:
--------------------------------------------------------------------------------
1 | [-23, -42, -21, 124, -21, -26, -87, -93, 80, -112, 117, 47, 10, 60, -2, -40] [12, -68, -68, 26, 53, -109, 111, -46, 74, -124, 116, -124, 98, 99, -43, 120] [32, -118, 85, -39, -91, -106, -46, -88, 127, 30, 78, -15, 24, -71, -63, -1]
2 | [-53, 59, -70, 89, 76, -53, 31, -100, -117, 78, -40, -14, 66, -12, -15, -71] [-4, -16, -28, 84, -123, 119, -124, 5, -102, 38, 112, -71, 39, 72, 5, -10] [35, 77, 49, 109, 73, -68, 81, 82, -106, -107, -4, -45, 22, 16, -89, -34]
3 | [34, 108, 14, -16, -125, 94, 120, 123, -71, -52, 40, 75, 95, -19, -11, -64] [-4, -16, -28, 84, -123, 119, -124, 5, -102, 38, 112, -71, 39, 72, 5, -10] [17, -11, 94, -32, 42, -54, 63, -59, 111, 52, -53, -69, 97, -114, 56, -17]
4 |
--------------------------------------------------------------------------------
/BodyMeter/build/classes/resources/base/login.txt:
--------------------------------------------------------------------------------
1 | [-23, -42, -21, 124, -21, -26, -87, -93, 80, -112, 117, 47, 10, 60, -2, -40] [12, -68, -68, 26, 53, -109, 111, -46, 74, -124, 116, -124, 98, 99, -43, 120] [32, -118, 85, -39, -91, -106, -46, -88, 127, 30, 78, -15, 24, -71, -63, -1]
2 | [-53, 59, -70, 89, 76, -53, 31, -100, -117, 78, -40, -14, 66, -12, -15, -71] [-4, -16, -28, 84, -123, 119, -124, 5, -102, 38, 112, -71, 39, 72, 5, -10] [35, 77, 49, 109, 73, -68, 81, 82, -106, -107, -4, -45, 22, 16, -89, -34]
3 | [34, 108, 14, -16, -125, 94, 120, 123, -71, -52, 40, 75, 95, -19, -11, -64] [-4, -16, -28, 84, -123, 119, -124, 5, -102, 38, 112, -71, 39, 72, 5, -10] [17, -11, 94, -32, 42, -54, 63, -59, 111, 52, -53, -69, 97, -114, 56, -17]
4 |
--------------------------------------------------------------------------------
/BodyMeter/src/resources/base/control - login.txt:
--------------------------------------------------------------------------------
1 | [-23, -42, -21, 124, -21, -26, -87, -93, 80, -112, 117, 47, 10, 60, -2, -40] [12, -68, -68, 26, 53, -109, 111, -46, 74, -124, 116, -124, 98, 99, -43, 120] [32, -118, 85, -39, -91, -106, -46, -88, 127, 30, 78, -15, 24, -71, -63, -1]
2 | [-53, 59, -70, 89, 76, -53, 31, -100, -117, 78, -40, -14, 66, -12, -15, -71] [-4, -16, -28, 84, -123, 119, -124, 5, -102, 38, 112, -71, 39, 72, 5, -10] [35, 77, 49, 109, 73, -68, 81, 82, -106, -107, -4, -45, 22, 16, -89, -34]
3 | [34, 108, 14, -16, -125, 94, 120, 123, -71, -52, 40, 75, 95, -19, -11, -64] [-4, -16, -28, 84, -123, 119, -124, 5, -102, 38, 112, -71, 39, 72, 5, -10] [17, -11, 94, -32, 42, -54, 63, -59, 111, 52, -53, -69, 97, -114, 56, -17]
4 |
--------------------------------------------------------------------------------
/BodyMeter/build/classes/resources/base/control - login.txt:
--------------------------------------------------------------------------------
1 | [-23, -42, -21, 124, -21, -26, -87, -93, 80, -112, 117, 47, 10, 60, -2, -40] [12, -68, -68, 26, 53, -109, 111, -46, 74, -124, 116, -124, 98, 99, -43, 120] [32, -118, 85, -39, -91, -106, -46, -88, 127, 30, 78, -15, 24, -71, -63, -1]
2 | [-53, 59, -70, 89, 76, -53, 31, -100, -117, 78, -40, -14, 66, -12, -15, -71] [-4, -16, -28, 84, -123, 119, -124, 5, -102, 38, 112, -71, 39, 72, 5, -10] [35, 77, 49, 109, 73, -68, 81, 82, -106, -107, -4, -45, 22, 16, -89, -34]
3 | [34, 108, 14, -16, -125, 94, 120, 123, -71, -52, 40, 75, 95, -19, -11, -64] [-4, -16, -28, 84, -123, 119, -124, 5, -102, 38, 112, -71, 39, 72, 5, -10] [17, -11, 94, -32, 42, -54, 63, -59, 111, 52, -53, -69, 97, -114, 56, -17]
4 |
--------------------------------------------------------------------------------
/BodyMeter/src/logicBusiness/ExportData.java:
--------------------------------------------------------------------------------
1 | package logicBusiness;
2 |
3 | import java.io.*;
4 | import javax.crypto.Cipher;
5 |
6 | /*
7 | * @author ANONYMOUS
8 | * @author JULIAN C
9 | * @author DANIEL R
10 | * @author JUAN B
11 | */
12 |
13 | public interface ExportData {
14 | public void createFile(String nameDoc);
15 | public void createReport();
16 | public void readDatabase()throws IOException, Exception;
17 | public void saveData() throws Exception;
18 | public void deleteDataUser(String userToRemove) throws Exception;
19 | public void saveData(String user, String password, String id) throws Exception;
20 | public byte[] encrypt(String unencrypted) throws Exception;
21 | public String decrypt(String encrypted) throws Exception;
22 | public Cipher getCipher(boolean toEncrypt) throws Exception;
23 | public byte[] asBytes(String convertString);
24 | }
--------------------------------------------------------------------------------
/BodyMeter/nbproject/private/private.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | file:/C:/Users/Usuario/Documents/NetBeansProjects/ProyectoPooAnonymous/BodyMeter/src/UI/EditUserProfile.java
7 | file:/C:/Users/Usuario/Documents/NetBeansProjects/ProyectoPooAnonymous/BodyMeter/src/UI/TakeMeassurements.java
8 | file:/C:/Users/Usuario/Documents/NetBeansProjects/ProyectoPooAnonymous/BodyMeter/src/UI/NutritionistPrincipalScreen.java
9 | file:/C:/Users/Usuario/Documents/NetBeansProjects/ProyectoPooAnonymous/BodyMeter/src/UI/LoginScreen.java
10 | file:/C:/Users/Usuario/Documents/NetBeansProjects/ProyectoPooAnonymous/BodyMeter/src/logicBusiness/AnthropometricMeasurement.java
11 | file:/C:/Users/Usuario/Documents/NetBeansProjects/ProyectoPooAnonymous/BodyMeter/src/UI/PatientPrincipalScreen.java
12 | file:/C:/Users/Usuario/Documents/NetBeansProjects/ProyectoPooAnonymous/BodyMeter/src/UI/UserRegisterScreen.java
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/BodyMeter/dist/README.TXT:
--------------------------------------------------------------------------------
1 | ========================
2 | BUILD OUTPUT DESCRIPTION
3 | ========================
4 |
5 | When you build an Java application project that has a main class, the IDE
6 | automatically copies all of the JAR
7 | files on the projects classpath to your projects dist/lib folder. The IDE
8 | also adds each of the JAR files to the Class-Path element in the application
9 | JAR files manifest file (MANIFEST.MF).
10 |
11 | To run the project from the command line, go to the dist folder and
12 | type the following:
13 |
14 | java -jar "BodyMeter.jar"
15 |
16 | To distribute this project, zip up the dist folder (including the lib folder)
17 | and distribute the ZIP file.
18 |
19 | Notes:
20 |
21 | * If two JAR files on the project classpath have the same name, only the first
22 | JAR file is copied to the lib folder.
23 | * Only JAR files are copied to the lib folder.
24 | If the classpath contains other types of files or folders, these files (folders)
25 | are not copied.
26 | * If a library on the projects classpath also has a Class-Path element
27 | specified in the manifest,the content of the Class-Path element has to be on
28 | the projects runtime path.
29 | * To set a main class in a standard Java project, right-click the project node
30 | in the Projects window and choose Properties. Then click Run and enter the
31 | class name in the Main Class field. Alternatively, you can manually type the
32 | class name in the manifest Main-Class element.
33 |
--------------------------------------------------------------------------------
/BodyMeter/dist/BodyMeter/README.TXT:
--------------------------------------------------------------------------------
1 | ========================
2 | BUILD OUTPUT DESCRIPTION
3 | ========================
4 |
5 | When you build an Java application project that has a main class, the IDE
6 | automatically copies all of the JAR
7 | files on the projects classpath to your projects dist/lib folder. The IDE
8 | also adds each of the JAR files to the Class-Path element in the application
9 | JAR files manifest file (MANIFEST.MF).
10 |
11 | To run the project from the command line, go to the dist folder and
12 | type the following:
13 |
14 | java -jar "BodyMeter.jar"
15 |
16 | To distribute this project, zip up the dist folder (including the lib folder)
17 | and distribute the ZIP file.
18 |
19 | Notes:
20 |
21 | * If two JAR files on the project classpath have the same name, only the first
22 | JAR file is copied to the lib folder.
23 | * Only JAR files are copied to the lib folder.
24 | If the classpath contains other types of files or folders, these files (folders)
25 | are not copied.
26 | * If a library on the projects classpath also has a Class-Path element
27 | specified in the manifest,the content of the Class-Path element has to be on
28 | the projects runtime path.
29 | * To set a main class in a standard Java project, right-click the project node
30 | in the Projects window and choose Properties. Then click Run and enter the
31 | class name in the Main Class field. Alternatively, you can manually type the
32 | class name in the manifest Main-Class element.
33 |
--------------------------------------------------------------------------------
/BodyMeter/userProfile.txt:
--------------------------------------------------------------------------------
1 | [32, -118, 85, -39, -91, -106, -46, -88, 127, 30, 78, -15, 24, -71, -63, -1] [103, 115, -126, -54, -80, -93, 95, 33, -13, 41, 63, 103, 60, 83, -16, -46] [-5, -66, 126, -2, 112, 117, -50, 11, 23, -36, 27, -80, -52, 94, -98, 94] [105, -7, -120, -64, 21, 67, -96, 62, -107, -89, -24, 63, 26, 114, 73, 50] [100, 74, 23, -128, 46, -119, -104, -27, -69, -22, 107, 19, -128, 112, -37, 49] [-24, -65, -111, -9, 33, 87, 71, -7, -54, 90, -68, 112, -16, -73, -90, -110] [102, 100, -63, -94, 45, 94, 68, -5, 17, -40, -114, 103, -37, 54, 125, -3] [-121, 12, -41, 77, 47, 101, 19, -47, 30, -57, 48, 44, 92, -61, 29, -21, -116, 52, 89, 20, 9, 109, -74, 90, -36, -89, 39, 109, -72, -44, -64, 1] [-57, 81, -2, -89, 60, -52, -80, 97, -125, 104, -126, 68, -32, -127, -21, -44] [65, -43, -53, -55, 71, 99, 67, 59, 47, 29, 53, -84, -2, -78, -9, 16]
2 | [35, 77, 49, 109, 73, -68, 81, 82, -106, -107, -4, -45, 22, 16, -89, -34] [100, 74, 23, -128, 46, -119, -104, -27, -69, -22, 107, 19, -128, 112, -37, 49] [103, 20, -97, 110, 55, -7, -70, -118, 118, -84, 55, 97, -2, 103, -101, -12] [104, 41, 92, 118, 30, 86, -65, 30, -82, 115, -46, 90, -64, 82, 33, 23] [100, 74, 23, -128, 46, -119, -104, -27, -69, -22, 107, 19, -128, 112, -37, 49] [114, 65, 89, -97, -16, -119, -34, -67, 13, -114, 58, -55, 124, -107, 125, -18] [93, -52, -27, 4, -25, -41, 34, -73, -101, 47, -21, -33, 11, 96, 87, 53] [33, -63, 51, 113, -96, -87, -115, -15, 22, -93, -124, -78, 119, 36, 23, -70, 19, 12, -65, -47, 90, 91, -107, 59, -68, -75, 70, -102, -64, -5, 95, 58] [55, -92, -36, -55, 67, 13, -90, 6, 62, 19, 57, 9, -90, 86, -96, -24] [103, 115, -126, -54, -80, -93, 95, 33, -13, 41, 63, 103, 60, 83, -16, -46]
3 | [17, -11, 94, -32, 42, -54, 63, -59, 111, 52, -53, -69, 97, -114, 56, -17] [100, 74, 23, -128, 46, -119, -104, -27, -69, -22, 107, 19, -128, 112, -37, 49] [-102, 93, 124, 49, 20, -43, 23, -12, 81, 23, 115, 88, -41, 124, -37, 73] [-11, -112, -51, 87, -126, 32, -105, -115, 79, -122, -82, 7, 65, -64, -40, 96] [100, 74, 23, -128, 46, -119, -104, -27, -69, -22, 107, 19, -128, 112, -37, 49] [-121, -62, 57, 62, -105, -110, 107, -109, 41, 126, -3, 67, -115, 97, -115, 95] [-6, 44, -76, -39, 27, 117, 119, 122, -7, 23, -54, 75, -35, 17, 90, -32] [-25, -98, 30, 51, 118, -96, -79, 37, -38, 52, 33, 70, -44, -93, 0, 20, 112, -111, -94, -105, 17, 121, -95, -106, 110, 105, 67, 60, -107, -86, 28, 53] [55, -92, -36, -55, 67, 13, -90, 6, 62, 19, 57, 9, -90, 86, -96, -24] [100, 74, 23, -128, 46, -119, -104, -27, -69, -22, 107, 19, -128, 112, -37, 49]
4 |
--------------------------------------------------------------------------------
/BodyMeter/dist/userProfile.txt:
--------------------------------------------------------------------------------
1 | [32, -118, 85, -39, -91, -106, -46, -88, 127, 30, 78, -15, 24, -71, -63, -1] [103, 115, -126, -54, -80, -93, 95, 33, -13, 41, 63, 103, 60, 83, -16, -46] [-5, -66, 126, -2, 112, 117, -50, 11, 23, -36, 27, -80, -52, 94, -98, 94] [105, -7, -120, -64, 21, 67, -96, 62, -107, -89, -24, 63, 26, 114, 73, 50] [100, 74, 23, -128, 46, -119, -104, -27, -69, -22, 107, 19, -128, 112, -37, 49] [-24, -65, -111, -9, 33, 87, 71, -7, -54, 90, -68, 112, -16, -73, -90, -110] [102, 100, -63, -94, 45, 94, 68, -5, 17, -40, -114, 103, -37, 54, 125, -3] [-121, 12, -41, 77, 47, 101, 19, -47, 30, -57, 48, 44, 92, -61, 29, -21, -116, 52, 89, 20, 9, 109, -74, 90, -36, -89, 39, 109, -72, -44, -64, 1] [-57, 81, -2, -89, 60, -52, -80, 97, -125, 104, -126, 68, -32, -127, -21, -44] [65, -43, -53, -55, 71, 99, 67, 59, 47, 29, 53, -84, -2, -78, -9, 16]
2 | [35, 77, 49, 109, 73, -68, 81, 82, -106, -107, -4, -45, 22, 16, -89, -34] [100, 74, 23, -128, 46, -119, -104, -27, -69, -22, 107, 19, -128, 112, -37, 49] [103, 20, -97, 110, 55, -7, -70, -118, 118, -84, 55, 97, -2, 103, -101, -12] [104, 41, 92, 118, 30, 86, -65, 30, -82, 115, -46, 90, -64, 82, 33, 23] [100, 74, 23, -128, 46, -119, -104, -27, -69, -22, 107, 19, -128, 112, -37, 49] [114, 65, 89, -97, -16, -119, -34, -67, 13, -114, 58, -55, 124, -107, 125, -18] [93, -52, -27, 4, -25, -41, 34, -73, -101, 47, -21, -33, 11, 96, 87, 53] [33, -63, 51, 113, -96, -87, -115, -15, 22, -93, -124, -78, 119, 36, 23, -70, 19, 12, -65, -47, 90, 91, -107, 59, -68, -75, 70, -102, -64, -5, 95, 58] [55, -92, -36, -55, 67, 13, -90, 6, 62, 19, 57, 9, -90, 86, -96, -24] [103, 115, -126, -54, -80, -93, 95, 33, -13, 41, 63, 103, 60, 83, -16, -46]
3 | [17, -11, 94, -32, 42, -54, 63, -59, 111, 52, -53, -69, 97, -114, 56, -17] [100, 74, 23, -128, 46, -119, -104, -27, -69, -22, 107, 19, -128, 112, -37, 49] [-102, 93, 124, 49, 20, -43, 23, -12, 81, 23, 115, 88, -41, 124, -37, 73] [-11, -112, -51, 87, -126, 32, -105, -115, 79, -122, -82, 7, 65, -64, -40, 96] [100, 74, 23, -128, 46, -119, -104, -27, -69, -22, 107, 19, -128, 112, -37, 49] [-121, -62, 57, 62, -105, -110, 107, -109, 41, 126, -3, 67, -115, 97, -115, 95] [-6, 44, -76, -39, 27, 117, 119, 122, -7, 23, -54, 75, -35, 17, 90, -32] [-25, -98, 30, 51, 118, -96, -79, 37, -38, 52, 33, 70, -44, -93, 0, 20, 112, -111, -94, -105, 17, 121, -95, -106, 110, 105, 67, 60, -107, -86, 28, 53] [55, -92, -36, -55, 67, 13, -90, 6, 62, 19, 57, 9, -90, 86, -96, -24] [100, 74, 23, -128, 46, -119, -104, -27, -69, -22, 107, 19, -128, 112, -37, 49]
4 |
--------------------------------------------------------------------------------
/BodyMeter/control - userProfile.txt:
--------------------------------------------------------------------------------
1 | [32, -118, 85, -39, -91, -106, -46, -88, 127, 30, 78, -15, 24, -71, -63, -1] [103, 115, -126, -54, -80, -93, 95, 33, -13, 41, 63, 103, 60, 83, -16, -46] [-5, -66, 126, -2, 112, 117, -50, 11, 23, -36, 27, -80, -52, 94, -98, 94] [105, -7, -120, -64, 21, 67, -96, 62, -107, -89, -24, 63, 26, 114, 73, 50] [100, 74, 23, -128, 46, -119, -104, -27, -69, -22, 107, 19, -128, 112, -37, 49] [-24, -65, -111, -9, 33, 87, 71, -7, -54, 90, -68, 112, -16, -73, -90, -110] [102, 100, -63, -94, 45, 94, 68, -5, 17, -40, -114, 103, -37, 54, 125, -3] [-121, 12, -41, 77, 47, 101, 19, -47, 30, -57, 48, 44, 92, -61, 29, -21, -116, 52, 89, 20, 9, 109, -74, 90, -36, -89, 39, 109, -72, -44, -64, 1] [-57, 81, -2, -89, 60, -52, -80, 97, -125, 104, -126, 68, -32, -127, -21, -44] [65, -43, -53, -55, 71, 99, 67, 59, 47, 29, 53, -84, -2, -78, -9, 16]
2 | [35, 77, 49, 109, 73, -68, 81, 82, -106, -107, -4, -45, 22, 16, -89, -34] [100, 74, 23, -128, 46, -119, -104, -27, -69, -22, 107, 19, -128, 112, -37, 49] [103, 20, -97, 110, 55, -7, -70, -118, 118, -84, 55, 97, -2, 103, -101, -12] [104, 41, 92, 118, 30, 86, -65, 30, -82, 115, -46, 90, -64, 82, 33, 23] [100, 74, 23, -128, 46, -119, -104, -27, -69, -22, 107, 19, -128, 112, -37, 49] [114, 65, 89, -97, -16, -119, -34, -67, 13, -114, 58, -55, 124, -107, 125, -18] [93, -52, -27, 4, -25, -41, 34, -73, -101, 47, -21, -33, 11, 96, 87, 53] [33, -63, 51, 113, -96, -87, -115, -15, 22, -93, -124, -78, 119, 36, 23, -70, 19, 12, -65, -47, 90, 91, -107, 59, -68, -75, 70, -102, -64, -5, 95, 58] [55, -92, -36, -55, 67, 13, -90, 6, 62, 19, 57, 9, -90, 86, -96, -24] [103, 115, -126, -54, -80, -93, 95, 33, -13, 41, 63, 103, 60, 83, -16, -46]
3 | [17, -11, 94, -32, 42, -54, 63, -59, 111, 52, -53, -69, 97, -114, 56, -17] [100, 74, 23, -128, 46, -119, -104, -27, -69, -22, 107, 19, -128, 112, -37, 49] [-102, 93, 124, 49, 20, -43, 23, -12, 81, 23, 115, 88, -41, 124, -37, 73] [-11, -112, -51, 87, -126, 32, -105, -115, 79, -122, -82, 7, 65, -64, -40, 96] [100, 74, 23, -128, 46, -119, -104, -27, -69, -22, 107, 19, -128, 112, -37, 49] [-121, -62, 57, 62, -105, -110, 107, -109, 41, 126, -3, 67, -115, 97, -115, 95] [-6, 44, -76, -39, 27, 117, 119, 122, -7, 23, -54, 75, -35, 17, 90, -32] [-25, -98, 30, 51, 118, -96, -79, 37, -38, 52, 33, 70, -44, -93, 0, 20, 112, -111, -94, -105, 17, 121, -95, -106, 110, 105, 67, 60, -107, -86, 28, 53] [55, -92, -36, -55, 67, 13, -90, 6, 62, 19, 57, 9, -90, 86, -96, -24] [100, 74, 23, -128, 46, -119, -104, -27, -69, -22, 107, 19, -128, 112, -37, 49]
4 |
--------------------------------------------------------------------------------
/BodyMeter/dist/BodyMeter/userProfile.txt:
--------------------------------------------------------------------------------
1 | [32, -118, 85, -39, -91, -106, -46, -88, 127, 30, 78, -15, 24, -71, -63, -1] [103, 115, -126, -54, -80, -93, 95, 33, -13, 41, 63, 103, 60, 83, -16, -46] [-5, -66, 126, -2, 112, 117, -50, 11, 23, -36, 27, -80, -52, 94, -98, 94] [105, -7, -120, -64, 21, 67, -96, 62, -107, -89, -24, 63, 26, 114, 73, 50] [100, 74, 23, -128, 46, -119, -104, -27, -69, -22, 107, 19, -128, 112, -37, 49] [-24, -65, -111, -9, 33, 87, 71, -7, -54, 90, -68, 112, -16, -73, -90, -110] [102, 100, -63, -94, 45, 94, 68, -5, 17, -40, -114, 103, -37, 54, 125, -3] [-121, 12, -41, 77, 47, 101, 19, -47, 30, -57, 48, 44, 92, -61, 29, -21, -116, 52, 89, 20, 9, 109, -74, 90, -36, -89, 39, 109, -72, -44, -64, 1] [-57, 81, -2, -89, 60, -52, -80, 97, -125, 104, -126, 68, -32, -127, -21, -44] [65, -43, -53, -55, 71, 99, 67, 59, 47, 29, 53, -84, -2, -78, -9, 16]
2 | [35, 77, 49, 109, 73, -68, 81, 82, -106, -107, -4, -45, 22, 16, -89, -34] [100, 74, 23, -128, 46, -119, -104, -27, -69, -22, 107, 19, -128, 112, -37, 49] [103, 20, -97, 110, 55, -7, -70, -118, 118, -84, 55, 97, -2, 103, -101, -12] [104, 41, 92, 118, 30, 86, -65, 30, -82, 115, -46, 90, -64, 82, 33, 23] [100, 74, 23, -128, 46, -119, -104, -27, -69, -22, 107, 19, -128, 112, -37, 49] [114, 65, 89, -97, -16, -119, -34, -67, 13, -114, 58, -55, 124, -107, 125, -18] [93, -52, -27, 4, -25, -41, 34, -73, -101, 47, -21, -33, 11, 96, 87, 53] [33, -63, 51, 113, -96, -87, -115, -15, 22, -93, -124, -78, 119, 36, 23, -70, 19, 12, -65, -47, 90, 91, -107, 59, -68, -75, 70, -102, -64, -5, 95, 58] [55, -92, -36, -55, 67, 13, -90, 6, 62, 19, 57, 9, -90, 86, -96, -24] [103, 115, -126, -54, -80, -93, 95, 33, -13, 41, 63, 103, 60, 83, -16, -46]
3 | [17, -11, 94, -32, 42, -54, 63, -59, 111, 52, -53, -69, 97, -114, 56, -17] [100, 74, 23, -128, 46, -119, -104, -27, -69, -22, 107, 19, -128, 112, -37, 49] [-102, 93, 124, 49, 20, -43, 23, -12, 81, 23, 115, 88, -41, 124, -37, 73] [-11, -112, -51, 87, -126, 32, -105, -115, 79, -122, -82, 7, 65, -64, -40, 96] [100, 74, 23, -128, 46, -119, -104, -27, -69, -22, 107, 19, -128, 112, -37, 49] [-121, -62, 57, 62, -105, -110, 107, -109, 41, 126, -3, 67, -115, 97, -115, 95] [-6, 44, -76, -39, 27, 117, 119, 122, -7, 23, -54, 75, -35, 17, 90, -32] [-25, -98, 30, 51, 118, -96, -79, 37, -38, 52, 33, 70, -44, -93, 0, 20, 112, -111, -94, -105, 17, 121, -95, -106, 110, 105, 67, 60, -107, -86, 28, 53] [55, -92, -36, -55, 67, 13, -90, 6, 62, 19, 57, 9, -90, 86, -96, -24] [100, 74, 23, -128, 46, -119, -104, -27, -69, -22, 107, 19, -128, 112, -37, 49]
4 |
--------------------------------------------------------------------------------
/BodyMeter/src/resources/base/userProfile.txt:
--------------------------------------------------------------------------------
1 | [32, -118, 85, -39, -91, -106, -46, -88, 127, 30, 78, -15, 24, -71, -63, -1] [103, 115, -126, -54, -80, -93, 95, 33, -13, 41, 63, 103, 60, 83, -16, -46] [-5, -66, 126, -2, 112, 117, -50, 11, 23, -36, 27, -80, -52, 94, -98, 94] [105, -7, -120, -64, 21, 67, -96, 62, -107, -89, -24, 63, 26, 114, 73, 50] [100, 74, 23, -128, 46, -119, -104, -27, -69, -22, 107, 19, -128, 112, -37, 49] [-24, -65, -111, -9, 33, 87, 71, -7, -54, 90, -68, 112, -16, -73, -90, -110] [102, 100, -63, -94, 45, 94, 68, -5, 17, -40, -114, 103, -37, 54, 125, -3] [-121, 12, -41, 77, 47, 101, 19, -47, 30, -57, 48, 44, 92, -61, 29, -21, -116, 52, 89, 20, 9, 109, -74, 90, -36, -89, 39, 109, -72, -44, -64, 1] [-57, 81, -2, -89, 60, -52, -80, 97, -125, 104, -126, 68, -32, -127, -21, -44] [65, -43, -53, -55, 71, 99, 67, 59, 47, 29, 53, -84, -2, -78, -9, 16]
2 | [35, 77, 49, 109, 73, -68, 81, 82, -106, -107, -4, -45, 22, 16, -89, -34] [100, 74, 23, -128, 46, -119, -104, -27, -69, -22, 107, 19, -128, 112, -37, 49] [103, 20, -97, 110, 55, -7, -70, -118, 118, -84, 55, 97, -2, 103, -101, -12] [104, 41, 92, 118, 30, 86, -65, 30, -82, 115, -46, 90, -64, 82, 33, 23] [100, 74, 23, -128, 46, -119, -104, -27, -69, -22, 107, 19, -128, 112, -37, 49] [114, 65, 89, -97, -16, -119, -34, -67, 13, -114, 58, -55, 124, -107, 125, -18] [93, -52, -27, 4, -25, -41, 34, -73, -101, 47, -21, -33, 11, 96, 87, 53] [33, -63, 51, 113, -96, -87, -115, -15, 22, -93, -124, -78, 119, 36, 23, -70, 19, 12, -65, -47, 90, 91, -107, 59, -68, -75, 70, -102, -64, -5, 95, 58] [55, -92, -36, -55, 67, 13, -90, 6, 62, 19, 57, 9, -90, 86, -96, -24] [103, 115, -126, -54, -80, -93, 95, 33, -13, 41, 63, 103, 60, 83, -16, -46]
3 | [17, -11, 94, -32, 42, -54, 63, -59, 111, 52, -53, -69, 97, -114, 56, -17] [100, 74, 23, -128, 46, -119, -104, -27, -69, -22, 107, 19, -128, 112, -37, 49] [-102, 93, 124, 49, 20, -43, 23, -12, 81, 23, 115, 88, -41, 124, -37, 73] [-11, -112, -51, 87, -126, 32, -105, -115, 79, -122, -82, 7, 65, -64, -40, 96] [100, 74, 23, -128, 46, -119, -104, -27, -69, -22, 107, 19, -128, 112, -37, 49] [-121, -62, 57, 62, -105, -110, 107, -109, 41, 126, -3, 67, -115, 97, -115, 95] [-6, 44, -76, -39, 27, 117, 119, 122, -7, 23, -54, 75, -35, 17, 90, -32] [-25, -98, 30, 51, 118, -96, -79, 37, -38, 52, 33, 70, -44, -93, 0, 20, 112, -111, -94, -105, 17, 121, -95, -106, 110, 105, 67, 60, -107, -86, 28, 53] [55, -92, -36, -55, 67, 13, -90, 6, 62, 19, 57, 9, -90, 86, -96, -24] [100, 74, 23, -128, 46, -119, -104, -27, -69, -22, 107, 19, -128, 112, -37, 49]
4 |
--------------------------------------------------------------------------------
/BodyMeter/build/classes/resources/base/userProfile.txt:
--------------------------------------------------------------------------------
1 | [32, -118, 85, -39, -91, -106, -46, -88, 127, 30, 78, -15, 24, -71, -63, -1] [103, 115, -126, -54, -80, -93, 95, 33, -13, 41, 63, 103, 60, 83, -16, -46] [-5, -66, 126, -2, 112, 117, -50, 11, 23, -36, 27, -80, -52, 94, -98, 94] [105, -7, -120, -64, 21, 67, -96, 62, -107, -89, -24, 63, 26, 114, 73, 50] [100, 74, 23, -128, 46, -119, -104, -27, -69, -22, 107, 19, -128, 112, -37, 49] [-24, -65, -111, -9, 33, 87, 71, -7, -54, 90, -68, 112, -16, -73, -90, -110] [102, 100, -63, -94, 45, 94, 68, -5, 17, -40, -114, 103, -37, 54, 125, -3] [-121, 12, -41, 77, 47, 101, 19, -47, 30, -57, 48, 44, 92, -61, 29, -21, -116, 52, 89, 20, 9, 109, -74, 90, -36, -89, 39, 109, -72, -44, -64, 1] [-57, 81, -2, -89, 60, -52, -80, 97, -125, 104, -126, 68, -32, -127, -21, -44] [65, -43, -53, -55, 71, 99, 67, 59, 47, 29, 53, -84, -2, -78, -9, 16]
2 | [35, 77, 49, 109, 73, -68, 81, 82, -106, -107, -4, -45, 22, 16, -89, -34] [100, 74, 23, -128, 46, -119, -104, -27, -69, -22, 107, 19, -128, 112, -37, 49] [103, 20, -97, 110, 55, -7, -70, -118, 118, -84, 55, 97, -2, 103, -101, -12] [104, 41, 92, 118, 30, 86, -65, 30, -82, 115, -46, 90, -64, 82, 33, 23] [100, 74, 23, -128, 46, -119, -104, -27, -69, -22, 107, 19, -128, 112, -37, 49] [114, 65, 89, -97, -16, -119, -34, -67, 13, -114, 58, -55, 124, -107, 125, -18] [93, -52, -27, 4, -25, -41, 34, -73, -101, 47, -21, -33, 11, 96, 87, 53] [33, -63, 51, 113, -96, -87, -115, -15, 22, -93, -124, -78, 119, 36, 23, -70, 19, 12, -65, -47, 90, 91, -107, 59, -68, -75, 70, -102, -64, -5, 95, 58] [55, -92, -36, -55, 67, 13, -90, 6, 62, 19, 57, 9, -90, 86, -96, -24] [103, 115, -126, -54, -80, -93, 95, 33, -13, 41, 63, 103, 60, 83, -16, -46]
3 | [17, -11, 94, -32, 42, -54, 63, -59, 111, 52, -53, -69, 97, -114, 56, -17] [100, 74, 23, -128, 46, -119, -104, -27, -69, -22, 107, 19, -128, 112, -37, 49] [-102, 93, 124, 49, 20, -43, 23, -12, 81, 23, 115, 88, -41, 124, -37, 73] [-11, -112, -51, 87, -126, 32, -105, -115, 79, -122, -82, 7, 65, -64, -40, 96] [100, 74, 23, -128, 46, -119, -104, -27, -69, -22, 107, 19, -128, 112, -37, 49] [-121, -62, 57, 62, -105, -110, 107, -109, 41, 126, -3, 67, -115, 97, -115, 95] [-6, 44, -76, -39, 27, 117, 119, 122, -7, 23, -54, 75, -35, 17, 90, -32] [-25, -98, 30, 51, 118, -96, -79, 37, -38, 52, 33, 70, -44, -93, 0, 20, 112, -111, -94, -105, 17, 121, -95, -106, 110, 105, 67, 60, -107, -86, 28, 53] [55, -92, -36, -55, 67, 13, -90, 6, 62, 19, 57, 9, -90, 86, -96, -24] [100, 74, 23, -128, 46, -119, -104, -27, -69, -22, 107, 19, -128, 112, -37, 49]
4 |
--------------------------------------------------------------------------------
/BodyMeter/src/resources/base/control - userProfile.txt:
--------------------------------------------------------------------------------
1 | [32, -118, 85, -39, -91, -106, -46, -88, 127, 30, 78, -15, 24, -71, -63, -1] [103, 115, -126, -54, -80, -93, 95, 33, -13, 41, 63, 103, 60, 83, -16, -46] [-5, -66, 126, -2, 112, 117, -50, 11, 23, -36, 27, -80, -52, 94, -98, 94] [105, -7, -120, -64, 21, 67, -96, 62, -107, -89, -24, 63, 26, 114, 73, 50] [100, 74, 23, -128, 46, -119, -104, -27, -69, -22, 107, 19, -128, 112, -37, 49] [-24, -65, -111, -9, 33, 87, 71, -7, -54, 90, -68, 112, -16, -73, -90, -110] [102, 100, -63, -94, 45, 94, 68, -5, 17, -40, -114, 103, -37, 54, 125, -3] [-121, 12, -41, 77, 47, 101, 19, -47, 30, -57, 48, 44, 92, -61, 29, -21, -116, 52, 89, 20, 9, 109, -74, 90, -36, -89, 39, 109, -72, -44, -64, 1] [-57, 81, -2, -89, 60, -52, -80, 97, -125, 104, -126, 68, -32, -127, -21, -44] [65, -43, -53, -55, 71, 99, 67, 59, 47, 29, 53, -84, -2, -78, -9, 16]
2 | [35, 77, 49, 109, 73, -68, 81, 82, -106, -107, -4, -45, 22, 16, -89, -34] [100, 74, 23, -128, 46, -119, -104, -27, -69, -22, 107, 19, -128, 112, -37, 49] [103, 20, -97, 110, 55, -7, -70, -118, 118, -84, 55, 97, -2, 103, -101, -12] [104, 41, 92, 118, 30, 86, -65, 30, -82, 115, -46, 90, -64, 82, 33, 23] [100, 74, 23, -128, 46, -119, -104, -27, -69, -22, 107, 19, -128, 112, -37, 49] [114, 65, 89, -97, -16, -119, -34, -67, 13, -114, 58, -55, 124, -107, 125, -18] [93, -52, -27, 4, -25, -41, 34, -73, -101, 47, -21, -33, 11, 96, 87, 53] [33, -63, 51, 113, -96, -87, -115, -15, 22, -93, -124, -78, 119, 36, 23, -70, 19, 12, -65, -47, 90, 91, -107, 59, -68, -75, 70, -102, -64, -5, 95, 58] [55, -92, -36, -55, 67, 13, -90, 6, 62, 19, 57, 9, -90, 86, -96, -24] [103, 115, -126, -54, -80, -93, 95, 33, -13, 41, 63, 103, 60, 83, -16, -46]
3 | [17, -11, 94, -32, 42, -54, 63, -59, 111, 52, -53, -69, 97, -114, 56, -17] [100, 74, 23, -128, 46, -119, -104, -27, -69, -22, 107, 19, -128, 112, -37, 49] [-102, 93, 124, 49, 20, -43, 23, -12, 81, 23, 115, 88, -41, 124, -37, 73] [-11, -112, -51, 87, -126, 32, -105, -115, 79, -122, -82, 7, 65, -64, -40, 96] [100, 74, 23, -128, 46, -119, -104, -27, -69, -22, 107, 19, -128, 112, -37, 49] [-121, -62, 57, 62, -105, -110, 107, -109, 41, 126, -3, 67, -115, 97, -115, 95] [-6, 44, -76, -39, 27, 117, 119, 122, -7, 23, -54, 75, -35, 17, 90, -32] [-25, -98, 30, 51, 118, -96, -79, 37, -38, 52, 33, 70, -44, -93, 0, 20, 112, -111, -94, -105, 17, 121, -95, -106, 110, 105, 67, 60, -107, -86, 28, 53] [55, -92, -36, -55, 67, 13, -90, 6, 62, 19, 57, 9, -90, 86, -96, -24] [100, 74, 23, -128, 46, -119, -104, -27, -69, -22, 107, 19, -128, 112, -37, 49]
4 |
--------------------------------------------------------------------------------
/BodyMeter/build/classes/resources/base/control - userProfile.txt:
--------------------------------------------------------------------------------
1 | [32, -118, 85, -39, -91, -106, -46, -88, 127, 30, 78, -15, 24, -71, -63, -1] [103, 115, -126, -54, -80, -93, 95, 33, -13, 41, 63, 103, 60, 83, -16, -46] [-5, -66, 126, -2, 112, 117, -50, 11, 23, -36, 27, -80, -52, 94, -98, 94] [105, -7, -120, -64, 21, 67, -96, 62, -107, -89, -24, 63, 26, 114, 73, 50] [100, 74, 23, -128, 46, -119, -104, -27, -69, -22, 107, 19, -128, 112, -37, 49] [-24, -65, -111, -9, 33, 87, 71, -7, -54, 90, -68, 112, -16, -73, -90, -110] [102, 100, -63, -94, 45, 94, 68, -5, 17, -40, -114, 103, -37, 54, 125, -3] [-121, 12, -41, 77, 47, 101, 19, -47, 30, -57, 48, 44, 92, -61, 29, -21, -116, 52, 89, 20, 9, 109, -74, 90, -36, -89, 39, 109, -72, -44, -64, 1] [-57, 81, -2, -89, 60, -52, -80, 97, -125, 104, -126, 68, -32, -127, -21, -44] [65, -43, -53, -55, 71, 99, 67, 59, 47, 29, 53, -84, -2, -78, -9, 16]
2 | [35, 77, 49, 109, 73, -68, 81, 82, -106, -107, -4, -45, 22, 16, -89, -34] [100, 74, 23, -128, 46, -119, -104, -27, -69, -22, 107, 19, -128, 112, -37, 49] [103, 20, -97, 110, 55, -7, -70, -118, 118, -84, 55, 97, -2, 103, -101, -12] [104, 41, 92, 118, 30, 86, -65, 30, -82, 115, -46, 90, -64, 82, 33, 23] [100, 74, 23, -128, 46, -119, -104, -27, -69, -22, 107, 19, -128, 112, -37, 49] [114, 65, 89, -97, -16, -119, -34, -67, 13, -114, 58, -55, 124, -107, 125, -18] [93, -52, -27, 4, -25, -41, 34, -73, -101, 47, -21, -33, 11, 96, 87, 53] [33, -63, 51, 113, -96, -87, -115, -15, 22, -93, -124, -78, 119, 36, 23, -70, 19, 12, -65, -47, 90, 91, -107, 59, -68, -75, 70, -102, -64, -5, 95, 58] [55, -92, -36, -55, 67, 13, -90, 6, 62, 19, 57, 9, -90, 86, -96, -24] [103, 115, -126, -54, -80, -93, 95, 33, -13, 41, 63, 103, 60, 83, -16, -46]
3 | [17, -11, 94, -32, 42, -54, 63, -59, 111, 52, -53, -69, 97, -114, 56, -17] [100, 74, 23, -128, 46, -119, -104, -27, -69, -22, 107, 19, -128, 112, -37, 49] [-102, 93, 124, 49, 20, -43, 23, -12, 81, 23, 115, 88, -41, 124, -37, 73] [-11, -112, -51, 87, -126, 32, -105, -115, 79, -122, -82, 7, 65, -64, -40, 96] [100, 74, 23, -128, 46, -119, -104, -27, -69, -22, 107, 19, -128, 112, -37, 49] [-121, -62, 57, 62, -105, -110, 107, -109, 41, 126, -3, 67, -115, 97, -115, 95] [-6, 44, -76, -39, 27, 117, 119, 122, -7, 23, -54, 75, -35, 17, 90, -32] [-25, -98, 30, 51, 118, -96, -79, 37, -38, 52, 33, 70, -44, -93, 0, 20, 112, -111, -94, -105, 17, 121, -95, -106, 110, 105, 67, 60, -107, -86, 28, 53] [55, -92, -36, -55, 67, 13, -90, 6, 62, 19, 57, 9, -90, 86, -96, -24] [100, 74, 23, -128, 46, -119, -104, -27, -69, -22, 107, 19, -128, 112, -37, 49]
4 |
--------------------------------------------------------------------------------
/BodyMeter/nbproject/project.properties:
--------------------------------------------------------------------------------
1 | annotation.processing.enabled=true
2 | annotation.processing.enabled.in.editor=false
3 | annotation.processing.processors.list=
4 | annotation.processing.run.all.processors=true
5 | annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
6 | application.title=BodyMeter
7 | application.vendor=JULIAN C
8 | build.classes.dir=${build.dir}/classes
9 | build.classes.excludes=**/*.java,**/*.form
10 | # This directory is removed when the project is cleaned:
11 | build.dir=build
12 | build.generated.dir=${build.dir}/generated
13 | build.generated.sources.dir=${build.dir}/generated-sources
14 | # Only compile against the classpath explicitly listed here:
15 | build.sysclasspath=ignore
16 | build.test.classes.dir=${build.dir}/test/classes
17 | build.test.results.dir=${build.dir}/test/results
18 | # Uncomment to specify the preferred debugger connection transport:
19 | #debug.transport=dt_socket
20 | debug.classpath=\
21 | ${run.classpath}
22 | debug.test.classpath=\
23 | ${run.test.classpath}
24 | # Files in build.classes.dir which should be excluded from distribution jar
25 | dist.archive.excludes=
26 | # This directory is removed when the project is cleaned:
27 | dist.dir=dist
28 | dist.jar=${dist.dir}/BodyMeter.jar
29 | dist.javadoc.dir=${dist.dir}/javadoc
30 | endorsed.classpath=
31 | excludes=
32 | includes=**
33 | jar.compress=false
34 | javac.classpath=\
35 | ${libs.absolutelayout.classpath}
36 | # Space-separated list of extra javac options
37 | javac.compilerargs=
38 | javac.deprecation=false
39 | javac.external.vm=true
40 | javac.processorpath=\
41 | ${javac.classpath}
42 | javac.source=1.8
43 | javac.target=1.8
44 | javac.test.classpath=\
45 | ${javac.classpath}:\
46 | ${build.classes.dir}
47 | javac.test.processorpath=\
48 | ${javac.test.classpath}
49 | javadoc.additionalparam=
50 | javadoc.author=false
51 | javadoc.encoding=${source.encoding}
52 | javadoc.noindex=false
53 | javadoc.nonavbar=false
54 | javadoc.notree=false
55 | javadoc.private=false
56 | javadoc.splitindex=true
57 | javadoc.use=true
58 | javadoc.version=false
59 | javadoc.windowtitle=
60 | main.class=logicBusiness.BodymeterMainManager
61 | manifest.file=manifest.mf
62 | meta.inf.dir=${src.dir}/META-INF
63 | mkdist.disabled=false
64 | platform.active=default_platform
65 | run.classpath=\
66 | ${javac.classpath}:\
67 | ${build.classes.dir}
68 | # Space-separated list of JVM arguments used when running the project.
69 | # You may also define separate properties like run-sys-prop.name=value instead of -Dname=value.
70 | # To set system properties for unit tests define test-sys-prop.name=value:
71 | run.jvmargs=
72 | run.test.classpath=\
73 | ${javac.test.classpath}:\
74 | ${build.test.classes.dir}
75 | source.encoding=UTF-8
76 | src.dir=src
77 | test.src.dir=test
78 |
--------------------------------------------------------------------------------
/BodyMeter/build.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | Builds, tests, and runs the project BodyMeter.
12 |
13 |
73 |
74 |
--------------------------------------------------------------------------------
/BodyMeter/src/data/Nutritionist.java:
--------------------------------------------------------------------------------
1 | package data;
2 |
3 | import java.io.*;
4 | import java.nio.file.Path;
5 | import java.nio.file.Paths;
6 | import java.util.Arrays;
7 |
8 | /*
9 | * @author ANONYMOUS
10 | * @author JULIAN C
11 | * @author DANIEL R
12 | * @author JUAN B
13 | */
14 | public class Nutritionist extends User {
15 |
16 | private final String nameDoc = "userProfile.txt";
17 | //private String pathfile = Paths.get("D:\\Archivos\\"+nameDoc);
18 | private final String pathfile = new File("").getAbsolutePath() + "\\src\\resources\\base\\" + nameDoc;
19 | private String yearsOfExperience, professionalCard;
20 |
21 | Patient patient = new Patient();
22 |
23 | /* ----------- BUILDER ------------------------------------------------------------------------------------------------------*/
24 | public Nutritionist() {
25 | }
26 |
27 | public Nutritionist(String id, String userType, String name, String lastName,
28 | String sex, String birthdate, String phone, String email, String yearsOfExperience, String professionalCard) {
29 | super(id, userType, name, lastName, sex, birthdate, phone, email);
30 | this.yearsOfExperience = yearsOfExperience;
31 | this.professionalCard = professionalCard;
32 | }
33 |
34 | /* ----------- METHODS ------------------------------------------------------------------------------------------------------*/
35 |
36 | public void listNutritionist() throws Exception {
37 | System.out.println("\nLISTA DE NUTRICIONISTAS ");//(Default: (user: jul psw: 1234))");
38 | System.out.println("-------------------------\n");
39 | System.out.println(getListOfNutritionistsData());
40 |
41 | }
42 |
43 | @Override
44 | public void saveData() throws Exception { //Save only User profile
45 |
46 | String tempId = getId();
47 | String tempUserType = getUserType();
48 | String tempName = getName();
49 | String tempLastname = getLastName();
50 | String tempSex = getSex();
51 | String tempBirthday = getBirthdate();
52 | String tempPhone = getPhone();
53 | String tempEmail = getEmail();
54 | String tempYearsExperience = getYearsOfExperience();
55 | String tempProfessionalCard = getProfessionalCard();
56 |
57 | try (FileWriter fw = new FileWriter(pathfile, true);
58 | PrintWriter writeTXT = new PrintWriter(fw)) {
59 | deleteDataUser(tempId);
60 | writeTXT.print(Arrays.toString(encrypt(tempId)));
61 | writeTXT.print("\t");
62 | writeTXT.print(Arrays.toString(encrypt(tempUserType)));
63 | writeTXT.print("\t");
64 | writeTXT.print(Arrays.toString(encrypt(tempName)));
65 | writeTXT.print("\t");
66 | writeTXT.print(Arrays.toString(encrypt(tempLastname)));
67 | writeTXT.print("\t");
68 | writeTXT.print(Arrays.toString(encrypt(tempSex)));
69 | writeTXT.print("\t");
70 | writeTXT.print(Arrays.toString(encrypt(tempBirthday)));
71 | writeTXT.print("\t");
72 | writeTXT.print(Arrays.toString(encrypt(tempPhone)));
73 | writeTXT.print("\t");
74 | writeTXT.print(Arrays.toString(encrypt(tempEmail)));
75 | writeTXT.print("\t");
76 | writeTXT.print(Arrays.toString(encrypt(tempYearsExperience)));
77 | writeTXT.print("\t");
78 | writeTXT.println(Arrays.toString(encrypt(tempProfessionalCard)));
79 |
80 | fw.close();
81 | } catch (IOException ex) {
82 | System.out.println(ex.getMessage());
83 | }
84 | /*
85 | try (FileWriter fw = new FileWriter("nutritionistDataTestFile.txt", true);
86 | PrintWriter writeTXT = new PrintWriter(fw)) {
87 | //Login.deleteUser(user);
88 | writeTXT.print(tempId);
89 | writeTXT.print("\t");
90 | writeTXT.print(tempUserType);
91 | writeTXT.print("\t");
92 | writeTXT.print(tempName);
93 | writeTXT.print("\t");
94 | writeTXT.print(tempLastname);
95 | writeTXT.print("\t");
96 | writeTXT.print(tempSex);
97 | writeTXT.print("\t");
98 | writeTXT.print(tempBirthday);
99 | writeTXT.print("\t");
100 | writeTXT.print(tempPhone);
101 | writeTXT.print("\t");
102 | writeTXT.print(tempEmail);
103 | writeTXT.print("\t");
104 | writeTXT.print(tempYearsExperience);
105 | writeTXT.print("\t");
106 | writeTXT.println(tempProfessionalCard);
107 |
108 | fw.close();
109 | } catch (IOException ex) {
110 | System.out.println(ex.getMessage());
111 | }*/
112 | }
113 | /* ----------- SETTERS & GETTERS --------------------------------------------------------------------------------------------*/
114 | public String getYearsOfExperience() {
115 | return yearsOfExperience;
116 | }
117 |
118 | public void setYearsOfExperience(String yearsOfExperience) {
119 | this.yearsOfExperience = yearsOfExperience;
120 | }
121 |
122 | public String getProfessionalCard() {
123 | return professionalCard;
124 | }
125 |
126 | public void setProfessionalCard(String professionalCard) {
127 | this.professionalCard = professionalCard;
128 | }
129 |
130 |
131 |
132 | }
133 |
--------------------------------------------------------------------------------
/BodyMeter/src/data/Patient.java:
--------------------------------------------------------------------------------
1 | package data;
2 |
3 | import java.io.*;
4 | import java.util.Arrays;
5 | import java.util.HashMap;
6 | import logicBusiness.AnthropometricMeasurement;
7 | import logicBusiness.ExportData;
8 |
9 | /*
10 | * @author ANONYMOUS
11 | * @author JULIAN C
12 | * @author DANIEL R
13 | * @author JUAN B
14 | */
15 | public class Patient extends User implements ExportData {
16 |
17 | private final String nameDoc = "userProfile.txt";
18 | private final String pathfile = nameDoc;
19 | //private final String pathfile = new File("").getAbsolutePath() + "\\src\\resources\\base\\" + nameDoc;
20 | private String age, sports;
21 | AnthropometricMeasurement measurements = new AnthropometricMeasurement();
22 | private final BufferedReader bufferRead = null;
23 |
24 |
25 | /* ----------- BUILDER ----------------------------------------------------*/
26 | public Patient() {
27 | }
28 |
29 | public Patient(String id, String userType, String name, String lastName, String sex,
30 | String birthdate, String phone, String email, String age, String sports) {
31 | super(id, userType, name, lastName, sex, birthdate, phone, email);
32 | this.age = age;
33 | this.sports = sports;
34 | }
35 |
36 | /*----------- METHODS -----------------------------------------------------*/
37 | public void listPatients() throws Exception {
38 | System.out.println("\nLISTA DE PACIENTES ");//(Default: (user: jul psw: 1234))");
39 | System.out.println("------------------\n");
40 |
41 | System.out.println(getListOfPatientData());
42 |
43 | }
44 |
45 | @Override
46 | public void createReport() {
47 | throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
48 | }
49 |
50 | @Override
51 | public void saveData() throws Exception { //Save only User profile
52 |
53 | String tempId = getId();
54 | String tempUserType = getUserType();
55 | String tempName = getName();
56 | String tempLastname = getLastName();
57 | String tempSex = getSex();
58 | String tempBirthday = getBirthdate();
59 | String tempPhone = getPhone();
60 | String tempEmail = getEmail();
61 | String tempAge = getAge();
62 | String tempSport = getSports();
63 |
64 | try (FileWriter fw = new FileWriter(pathfile, true);
65 | PrintWriter writeTXT = new PrintWriter(fw)) {
66 | deleteDataUser(tempId);
67 | writeTXT.print(Arrays.toString(encrypt(tempId)));
68 | writeTXT.print("\t");
69 | writeTXT.print(Arrays.toString(encrypt(tempUserType)));
70 | writeTXT.print("\t");
71 | writeTXT.print(Arrays.toString(encrypt(tempName)));
72 | writeTXT.print("\t");
73 | writeTXT.print(Arrays.toString(encrypt(tempLastname)));
74 | writeTXT.print("\t");
75 | writeTXT.print(Arrays.toString(encrypt(tempSex)));
76 | writeTXT.print("\t");
77 | writeTXT.print(Arrays.toString(encrypt(tempBirthday)));
78 | writeTXT.print("\t");
79 | writeTXT.print(Arrays.toString(encrypt(tempPhone)));
80 | writeTXT.print("\t");
81 | writeTXT.print(Arrays.toString(encrypt(tempEmail)));
82 | writeTXT.print("\t");
83 | writeTXT.print(Arrays.toString(encrypt(tempAge)));
84 | writeTXT.print("\t");
85 | writeTXT.println(Arrays.toString(encrypt(tempSport)));
86 |
87 | fw.close();
88 |
89 | } catch (IOException ex) {
90 | System.out.println(ex.getMessage());
91 | }
92 |
93 | /*
94 | try (FileWriter fw = new FileWriter("patientDataTestFile.txt", true);
95 | PrintWriter writeTXT = new PrintWriter(fw)) {
96 | //Login.deleteUser(user);
97 | writeTXT.print(tempId);
98 | writeTXT.print("\t");
99 | writeTXT.print(tempUserType);
100 | writeTXT.print("\t");
101 | writeTXT.print(tempName);
102 | writeTXT.print("\t");
103 | writeTXT.print(tempLastname);
104 | writeTXT.print("\t");
105 | writeTXT.print(tempSex);
106 | writeTXT.print("\t");
107 | writeTXT.print(tempBirthday);
108 | writeTXT.print("\t");
109 | writeTXT.print(tempPhone);
110 | writeTXT.print("\t");
111 | writeTXT.print(tempEmail);
112 | writeTXT.print("\t");
113 | writeTXT.print(tempAge);
114 | writeTXT.print("\t");
115 | writeTXT.println(tempSport);
116 |
117 | fw.close();
118 |
119 | } catch (IOException ex) {
120 | System.out.println(ex.getMessage());
121 | }*/
122 | }
123 |
124 |
125 | /*----------- SETTERS & GETTERS -------------------------------------------*/
126 | public AnthropometricMeasurement getMeasurements() {
127 | return measurements;
128 | }
129 |
130 | public void setMeasurements(AnthropometricMeasurement measurements) {
131 | this.measurements = measurements;
132 | }
133 |
134 | public String getAge() {
135 | return age;
136 | }
137 |
138 | public void setAge(String age) {
139 | this.age = age;
140 | }
141 |
142 | public String getSports() {
143 | return sports;
144 | }
145 |
146 | public void setSports(String sports) {
147 | this.sports = sports;
148 | }
149 |
150 | }
151 |
--------------------------------------------------------------------------------
/BodyMeter/src/logicBusiness/BodymeterMainManager.java:
--------------------------------------------------------------------------------
1 | package logicBusiness;
2 |
3 | import data.Nutritionist;
4 | import data.Patient;
5 | import data.User;
6 | import java.util.ArrayList;
7 | import java.util.List;
8 | import java.util.Scanner;
9 |
10 |
11 | /*
12 | * @author ANONYMOUS
13 | * @author JULIAN C
14 | * @author DANIEL R
15 | * @author JUAN B
16 | */
17 | public class BodymeterMainManager {
18 |
19 | public static void main(String[] args) throws Exception {
20 |
21 | BodymeterUIManager.showLoginScreen();
22 |
23 | /*----------------------------Bloque pruebas-----------------------------------*/
24 | /*
25 | char opcion;
26 | Scanner keyboard = new Scanner(System.in);
27 | Login login = new Login();
28 | List userList = new ArrayList<>();
29 |
30 | while (login.isActiveSession() == false) {
31 |
32 | System.out.println("\nBODYMETRIC");
33 | System.out.println("\n1. Iniciar sesión");
34 | System.out.println("2. Registrarse");
35 | System.out.println("3. Salir.");
36 | System.out.print("\nOpcion: ");
37 |
38 | opcion = keyboard.next().charAt(0);
39 | switch (opcion) {
40 | case '1':
41 | System.out.println("Sección -LOGIN-\n");
42 | //login.logIn();
43 | //login.deleteDataUser("jbarrantes");
44 | break;
45 | case '2':
46 | System.out.println("Sección -REGISTRARSE-\n");
47 | login.signUp();
48 | break;
49 | case '3':
50 | login.exit();
51 | break;
52 |
53 | default:
54 | System.out.println("Opción inválida.");
55 | break;
56 | }
57 |
58 | }//End While sesion
59 |
60 | while(login.isActiveSession() == true) {
61 | System.out.println("\nBODYMETRIC");
62 | System.out.println("\n1. Pacientes");
63 | System.out.println("2. Mediciones");
64 | System.out.println("3. Salir.");
65 | System.out.print("\nOpcion: ");
66 |
67 | opcion = keyboard.next().charAt(0);
68 | switch (opcion) {
69 | case '1':
70 | System.out.println("\nSección -Pacientes-");
71 |
72 | Patient patient = new Patient("1062085362", "1", "Julian", "Castro", "1", "08/11/1993",
73 | "3059117035", "juacastropa@unal.edu.co", "25", "0");
74 | patient.saveData();
75 | patient.getListOfPatientData();
76 |
77 | Nutritionist nutritionist = new Nutritionist("1061456492", "0", "Gabriela", "Rodríguez", "0",
78 | "14/09/1997", "3222294208", "grodriguez@unal.edu.co", "22", login.createIdentifier());
79 | nutritionist.saveData();
80 | nutritionist.getListOfNutritionistsData();
81 | break;
82 | case '2':
83 | System.out.println("\nSección -Mediciones-");
84 | CalculateAnthropometry allMeasures =
85 | new CalculateAnthropometry(64, 171, 89, 165.5,
86 | 8, 13, 4.5, 12, 6.5, 10, 13, 6, 0,
87 | 58.8,35.8, 29.8, 32, 26.7, 16.3, 96.3, 73.4, 75, 89.5, 50.5, 50.9, 34.5, 22.3,
88 | 41, 19.4, 25.6, 28.3, 20.6, 7.1, 5.6, 10.2 );
89 | allMeasures.saveData();
90 | //getMeasurements();
91 | break;
92 | case '3':
93 | login.exit();
94 | //System.out.println("Sección -Mediciones-");
95 | break;
96 |
97 | default:
98 | System.out.println("\nOpción inválida.");
99 | break;
100 | }
101 | }
102 |
103 | //C-R-U-D
104 | //CREATE
105 | //login.signUp();
106 | //login.saveData("admin", "password", "id");
107 | //login.saveData("yo", "password", "");
108 | //UPDATE
109 | //login.setId("1062085362");
110 | /*System.out.print("Ingrese contraseña nueva: ");
111 | String password = keyboard.nextLine();
112 | System.out.print("Ingrese usuario nuevo: ");
113 | String user = keyboard.nextLine();
114 | password = password.replaceAll(" ", "").trim();
115 | login.setUser(user);
116 | login.setPassword(password);
117 | login.saveData(login.getUser(), password, login.getId());*/
118 | /*//DELETE
119 | System.out.print("Ingrese usuario a eliminar: ");
120 | String user = keyboard.nextLine();
121 | login.deleteDataUser(user);
122 | login.deleteDataUser("admin");//*/
123 | //READ
124 | //System.out.println("Usuario: " + login.getUser() + " Contraseña: " + login.getPassword() + " Identificación: " + login.getId());
125 |
126 |
127 |
128 | //-------------- Bloque Pruebas -------------------------------------------//
129 | /*
130 | userList.add(new User("juacastropa", "1234", "juacastropa@unal.edu.co", false));
131 | userList.add(new Patient("julianscastro", "4321", "julians993@gmail.com", true));
132 | userList.add(new Patient("jbarrantes", "5678", "jbrrantes@unal.edu.co", false));
133 | userList.add(new User("drobayo", "9876", "drobayo@unal.edu.co", true));
134 |
135 |
136 | System.out.println("\nLista de usuarios por tipo de perfil");
137 | System.out.println("-----------------------------------");
138 | for (int i = 0; i <= userList.size() - 1; i++) {
139 | System.out.println(userList.get(i).toString());
140 | }
141 |
142 | System.out.print("\nIngrese sexo (1)Femenino (2) Masculino: ");
143 | String sex = null;
144 |
145 | //opcion = keyboard.next().charAt(0);
146 | opcion = '2';
147 | switch (opcion) {
148 | case '1':
149 | sex = "female";
150 | System.out.println("Seleccionó -Femenino-");
151 | break;
152 | case '2':
153 | sex = "male";
154 | System.out.println("Seleccionó -Masculino-");
155 | break;
156 |
157 | default:
158 | System.out.println("Opción inválida.");
159 | break;
160 | }
161 |
162 | System.out.print("Ingrese edad: ");
163 | keyboard.nextLine();
164 | String stringAge = keyboard.nextLine();
165 | //int age = Integer.parseInt(stringAge);
166 | int age = 25;
167 | System.out.println(age);
168 |
169 | CalculateAnthropometry basicMeasures = new CalculateAnthropometry(64, 171, 89, 165.5);
170 | double skinMass = basicMeasures.calculateSkinMass(sex, age, basicMeasures.getPeso(),
171 | basicMeasures.getTallaAltura());
172 |
173 | CalculateAnthropometry skinfoldMeasurements = new CalculateAnthropometry(8, 13, 4.5, 12, 6.5, 10, 13, 6, 0);
174 | double adiposeMass = skinfoldMeasurements.adiposeMassPrediction(basicMeasures.getTallaAltura());
175 |
176 | CalculateAnthropometry perimeterMeasurements = new CalculateAnthropometry(58.8,
177 | 35.8, 29.8, 32, 26.7, 16.3, 96.3, 73.4, 75, 89.5, 50.5, 50.9, 34.5, 22.3);
178 | double muscleMass = perimeterMeasurements.muscleMassPrediction(basicMeasures.getTallaAltura(),
179 | skinfoldMeasurements.getPliegueTriceps(), skinfoldMeasurements.getPliegueSubescapular(),
180 | skinfoldMeasurements.getPliegueAnteriorMuslo(), skinfoldMeasurements.getPliegueMedialPierna());
181 |
182 | CalculateAnthropometry diameterMeasurements = new CalculateAnthropometry(41, 19.4, 25.6, 28.3, 20.6, 7.1, 5.6, 10.2);
183 | double boneMass = diameterMeasurements.boneMassPrediction(basicMeasures.getTallaAltura(),
184 | perimeterMeasurements.getPerimetroCabeza());
185 |
186 | double residualMass = diameterMeasurements.residualMassPrediction(basicMeasures.getTallaSentado(),
187 | perimeterMeasurements.getPerimetroAbdominalCinturaMinimo(), skinfoldMeasurements.getPliegueAbdominal());
188 |
189 | CalculateAnthropometry ca = new CalculateAnthropometry();
190 | ca.predictionTotalBodyMass(basicMeasures.getPeso(), skinMass, adiposeMass, muscleMass, boneMass, residualMass);
191 |
192 | //-------------- Fin Bloque Pruebas -------------------------------------------//*/
193 |
194 |
195 |
196 | }//End Main
197 | }
198 |
--------------------------------------------------------------------------------
/BodyMeter/src/logicBusiness/Login.java:
--------------------------------------------------------------------------------
1 | package logicBusiness;
2 |
3 | import data.User;
4 | import java.io.*;
5 | import java.util.HashMap;
6 | import java.util.Scanner;
7 | import java.util.Arrays;
8 | import java.util.Map;
9 | import javax.swing.JOptionPane;
10 |
11 | /*
12 | * @author ANONYMOUS
13 | * @author JULIAN C
14 | * @author DANIEL R
15 | * @author JUAN B
16 | */
17 | public class Login extends User {
18 |
19 | //nameDoc
20 | private final String nameDoc = "login.txt";
21 | private final String pathfile = nameDoc;
22 | //private final String pathfile = new File("").getAbsolutePath() + "\\src\\resources\\base\\" + nameDoc;
23 | private String answer;
24 | private static int failedAttempt = 0;
25 | private boolean activeSession = false;
26 | private boolean thereIsAUser, thereIsADatabase;
27 | private HashMap userLoginList = new HashMap<>();
28 | private final Scanner keyboard = new Scanner(System.in);
29 | private BufferedReader bufferRead = null;
30 |
31 |
32 |
33 | /* ----------- BUILDER -----------------------------------------------------*/
34 | public Login() {
35 | }
36 |
37 | /* ----------- METHODS -----------------------------------------------------*/
38 | public void logIn(String userLogin, String passwordLogin) throws IOException, Exception {
39 | readDatabase();
40 |
41 | if (userLoginList.containsKey(userLogin)) {
42 | String[] userLoginData = userLoginList.get(userLogin);
43 | setUser(userLogin);
44 |
45 | if (userLoginData[2].equals(passwordLogin) && userLoginData[0] != null) {
46 | setPassword(passwordLogin);
47 | setId(userLoginData[0]);
48 | answer = "\nBienvenido " + userLogin.toUpperCase();
49 | failedAttempt = 0; //reinicia los intentos por si se hace un logout no lo saque del programa
50 | setActiveSession(true);
51 | } else {
52 | failedAttempt++;
53 | if (failedAttempt == 1) {
54 | answer = "Usted a tenido " + failedAttempt + " intento fallido";
55 | answer = answer.toUpperCase();
56 | setActiveSession(false);
57 | } else {
58 | answer = "Usted a tenido " + failedAttempt + " intentos fallidos";
59 | answer = answer.toUpperCase();
60 | setActiveSession(false);
61 | }
62 | }
63 | } else {
64 | setThereIsAUser(false);
65 | }
66 |
67 | System.out.println(answer);
68 | if (failedAttempt > 2) {//saca del programa si hay 3 intentos fallidos
69 | System.out.println("Muchos intentos fallidos. Pida ayuda al administrador");
70 | JOptionPane.showMessageDialog(null, "Muchos intentos fallidos. Pida ayuda al administrador");
71 | //System.exit(0);
72 | }
73 | }
74 |
75 | public void logIn() throws IOException, Exception {
76 | readDatabase();
77 | String userLogin, passwordLogin;
78 |
79 | System.out.println("\nINICIAR SESIÓN ");//(Default: (user: jul psw: 1234))");
80 | System.out.println("------------------");
81 |
82 | System.out.print("Ingrese usuario: ");
83 | userLogin = keyboard.nextLine();
84 | userLogin = userLogin.replaceAll(" ", "").trim().toLowerCase();
85 |
86 | System.out.print("Ingrese clave: ");
87 | passwordLogin = keyboard.nextLine();
88 | passwordLogin = passwordLogin.replaceAll(" ", "").trim();
89 | //*/
90 |
91 | if (userLoginList.containsKey(userLogin)) {
92 | String[] userLoginData = userLoginList.get(userLogin);
93 | setUser(userLogin);
94 |
95 | if (userLoginData[2].equals(passwordLogin) && userLoginData[0] != null) {
96 | setPassword(passwordLogin);
97 | setId(userLoginData[0]);
98 | answer = "\nBienvenido " + userLogin.toUpperCase();
99 | failedAttempt = 0; //reinicia los intentos por si se hace un logout no lo saque del programa
100 | setActiveSession(true);
101 |
102 | System.out.println("Usuario: " + userLoginData[1] + " Contraseña: " + userLoginData[2]
103 | + " Identificación: " + userLoginData[0]);
104 | } else {
105 | failedAttempt++;
106 | if (failedAttempt == 1) {
107 | answer = "Usted a tenido " + failedAttempt + " intento fallido";
108 | answer = answer.toUpperCase();
109 | setActiveSession(false);
110 | } else {
111 | answer = "Usted a tenido " + failedAttempt + " intentos fallidos";
112 | answer = answer.toUpperCase();
113 | setActiveSession(false);
114 | }
115 | }
116 | }
117 |
118 | System.out.println(answer);
119 | if (failedAttempt > 2) {//saca del programa si hay 3 intentos fallidos
120 | System.out.println("Muchos intentos fallidos. Ingrese después");
121 | System.exit(0);
122 | }
123 | }
124 |
125 | public void signUp() throws Exception {
126 | readDatabase();
127 | String newUser = "", newPassword = "", newId, exit = "";
128 |
129 | System.out.println("\nUSUARIO NUEVO");
130 | System.out.println("------------------");
131 |
132 | while ("".equalsIgnoreCase(newUser)) {
133 | System.out.print("Introduce Usuario nuevo: ");
134 | newUser = keyboard.nextLine();
135 | newUser = newUser.toLowerCase().replaceAll(" ", "").trim();
136 |
137 | if (userLoginList.containsKey(newUser)) {
138 | newUser = "";
139 | System.out.println("Usuario ya existe. Ingrese uno nuevo por favor");
140 | }
141 | }
142 |
143 | while (newPassword.length() < 4) {
144 | System.out.print("Introduce Contraseña nueva: ");
145 | newPassword = keyboard.nextLine();
146 | newPassword = newPassword.replaceAll(" ", "").trim();
147 | if (newPassword.length() < 4) {
148 | System.out.println("Contraseña con mínimo 4 caracteres. Ingrese una mas larga.");
149 | }
150 | }
151 |
152 | System.out.print("Introduce identificación nueva: ");
153 | newId = keyboard.nextLine();
154 | newId = newId.toLowerCase().replaceAll(" ", "").trim();
155 |
156 | System.out.print("¿Guardar? (Y/N): ");
157 | while ((!exit.equalsIgnoreCase("Y")) || (!exit.equalsIgnoreCase("N")) || (!exit.equalsIgnoreCase("C"))) {
158 | exit = keyboard.nextLine();
159 | if (exit.equalsIgnoreCase("Y")) {
160 |
161 | if (newId.equalsIgnoreCase("")) {
162 | saveData(newUser, newPassword, createIdentifier());
163 | } else {
164 | saveData(newUser, newPassword, newId);
165 | }
166 |
167 | System.out.println("\nGracias por registrase \'" + newUser + "\'\n");
168 | break;
169 | } else {
170 | System.out.print("\nNo guardado/Cancelado\n");
171 | break;
172 | }
173 | }
174 |
175 | exit();
176 | }
177 |
178 | @Override
179 | public void readDatabase() throws IOException, Exception { //Read only login data
180 | try {
181 | bufferRead = new BufferedReader(new FileReader(pathfile));
182 | setThereIsADatabase(true);
183 | String readTextLine, readUser, readPassword, readId;
184 |
185 | while ((readTextLine = bufferRead.readLine()) != null) {
186 |
187 | String[] dataUserArray = readTextLine.split("\t");
188 |
189 | readUser = dataUserArray[0];
190 | readUser = decrypt(readUser);
191 |
192 | readPassword = dataUserArray[1];
193 | readPassword = decrypt(readPassword);
194 |
195 | readId = dataUserArray[2];
196 | readId = decrypt(readId);
197 |
198 | String[] userValue = {readId, readUser, readPassword};
199 | userLoginList.put(readUser, userValue);
200 |
201 | System.out.printf("Usuario: %s\t", readUser);
202 | System.out.printf("Contraseña: %s\t", readPassword);
203 | System.out.printf("Identificación: %s\n", readId);
204 | }//End while
205 |
206 | setUserLoginList(userLoginList);
207 | } catch (FileNotFoundException exp) {
208 |
209 | System.out.println("Base de datos no encontrada. Se ha creado una nueva.");
210 |
211 | JOptionPane.showMessageDialog(null, "Base de datos no encontrada.\n"
212 | + " Se ha creado una nueva.");
213 | createFile(pathfile);
214 |
215 | System.out.println("\nRegistrese por favor.");
216 |
217 | readDatabase();
218 |
219 | }
220 |
221 | }
222 |
223 | @Override
224 | public void saveData(String user, String password, String id) throws Exception {//Save only User login data
225 | if (id.equals("")) {
226 | id = createIdentifier();
227 | }
228 |
229 | readDatabase();
230 |
231 | if (userLoginList.containsKey(user)) {
232 | deleteDataUser(user);
233 |
234 | try (FileWriter fw = new FileWriter(pathfile, true);
235 | PrintWriter writeTXT = new PrintWriter(fw)) {
236 | deleteDataUser(user);
237 | writeTXT.print(Arrays.toString(encrypt(user)));
238 | writeTXT.print("\t");
239 | writeTXT.print(Arrays.toString(encrypt(password)));
240 | writeTXT.print("\t");
241 | writeTXT.println(Arrays.toString(encrypt(id)));
242 | fw.close();
243 |
244 | } catch (IOException ex) {
245 | System.out.println(ex.getMessage());
246 | }
247 | } else {
248 | try (FileWriter fw = new FileWriter(pathfile, true);
249 | PrintWriter writeTXT = new PrintWriter(fw)) {
250 | deleteDataUser(user);
251 | writeTXT.print(Arrays.toString(encrypt(user)));
252 | writeTXT.print("\t");
253 | writeTXT.print(Arrays.toString(encrypt(password)));
254 | writeTXT.print("\t");
255 | writeTXT.println(Arrays.toString(encrypt(id)));
256 | fw.close();
257 |
258 | } catch (IOException ex) {
259 | System.out.println(ex.getMessage());
260 | }
261 | }
262 | }
263 |
264 | @Override
265 | public void deleteDataUser(String userToRemove) throws Exception {
266 | userToRemove = userToRemove.toLowerCase();
267 |
268 | if (userLoginList.containsKey(userToRemove)) {
269 | userLoginList.remove(userToRemove);
270 |
271 | try (FileWriter fw = new FileWriter(pathfile, false);
272 | PrintWriter writeTXT = new PrintWriter(fw)) {
273 |
274 | for (Map.Entry entry : userLoginList.entrySet()) {
275 | String user = entry.getKey();
276 | String[] value = entry.getValue();
277 | String password = value[2];
278 | String id = value[0];
279 |
280 | writeTXT.print(Arrays.toString(encrypt(user)));
281 | writeTXT.print("\t");
282 | writeTXT.print(Arrays.toString(encrypt(password)));
283 | writeTXT.print("\t");
284 | writeTXT.println(Arrays.toString(encrypt(id)));
285 | }
286 | //System.out.print("\nDatos actualizados.");
287 | fw.close();
288 |
289 | } catch (IOException ex) {
290 | System.out.println(ex.getMessage());
291 | }
292 | System.out.println("\nUsuario eliminado: " + userToRemove);
293 | } else {
294 | //System.out.println("\nEl usuario \'" + userToRemove + "\' no existe");
295 | }
296 | }
297 |
298 | public void exit() {
299 | System.out.println("\nSesión finalizada. Hasta pronto.\n");
300 | //setActiveSession(false);
301 | System.exit(0);
302 | }
303 |
304 | /* ----------- SETTERS & GETTERS ------------------------------------------*/
305 | public HashMap getUserLoginList() {
306 | return userLoginList;
307 | }
308 |
309 | public void setUserLoginList(HashMap userLoginList) {
310 | this.userLoginList = userLoginList;
311 | }
312 |
313 | public boolean isActiveSession() {
314 | return activeSession;
315 | }
316 |
317 | public void setActiveSession(boolean activeSession) {
318 | this.activeSession = activeSession;
319 | }
320 |
321 | public boolean isThereIsAUser() {
322 | return thereIsAUser;
323 | }
324 |
325 | public void setThereIsAUser(boolean thereIsAUser) {
326 | this.thereIsAUser = thereIsAUser;
327 | }
328 |
329 | public boolean isThereIsADatabase() {
330 | return thereIsADatabase;
331 | }
332 |
333 | public void setThereIsADatabase(boolean thereIsADatabase) {
334 | this.thereIsADatabase = thereIsADatabase;
335 | }
336 |
337 | /* ------------------------------------------------------------------------*/
338 | @Override
339 | public void saveData() throws Exception {
340 | throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
341 | }
342 |
343 | }
344 |
--------------------------------------------------------------------------------
/BodyMeter/src/UI/LoginScreen.form:
--------------------------------------------------------------------------------
1 |
2 |
3 |
256 |
--------------------------------------------------------------------------------
/BodyMeter/src/logicBusiness/CalculateAnthropometry.java:
--------------------------------------------------------------------------------
1 | package logicBusiness;
2 |
3 | /*
4 | * @author ANONYMOUS
5 | * @author JULIAN C
6 | * @author DANIEL R
7 | * @author JUAN B
8 | */
9 | public class CalculateAnthropometry extends AnthropometricMeasurement {
10 |
11 | /* ----------- METHODS ------------------------------------------------------------------------------------------------------*/
12 | public double calculateSkinMass(String sex, int age, double weight, double heightStature) {
13 |
14 | double constantSurfaceAreaMenOver12Years = 68.308;
15 | double constantSurfaceAreaWomenOver12Years = 73.704;
16 | double constantSurfaceAreaWomenAndMenUnder12Years = 70.691;
17 | double skinThicknessMen = 2.07;
18 | double skinThicknessWomen = 1.96;
19 | double skinDensity = 1.05;
20 | double skinMass = 0, bodySurface = 0; //bodySurface in metros^2
21 |
22 | if (age > 12) {
23 | if ("female".equals(sex)) {
24 | bodySurface = (constantSurfaceAreaWomenOver12Years * Math.pow(getPeso(), 0.425) * Math.pow(heightStature, 0.725)) / 10000;
25 | } else if ("male".equals(sex)) {
26 | bodySurface = (constantSurfaceAreaMenOver12Years * Math.pow(getPeso(), 0.425) * Math.pow(heightStature, 0.725)) / 10000;
27 | }
28 | } else {
29 | bodySurface = (constantSurfaceAreaWomenAndMenUnder12Years * Math.pow(getPeso(), 0.425) * Math.pow(heightStature, 0.725)) / 10000;
30 | }
31 |
32 | if ("female".equals(sex)) {
33 | skinMass = bodySurface * skinThicknessWomen * skinDensity;
34 | } else if ("male".equals(sex)) {
35 | skinMass = bodySurface * skinThicknessMen * skinDensity;
36 | }
37 |
38 | System.out.printf("1. Calculo de la masa de la piel(Kg): %.2f %n", skinMass);
39 | return skinMass;
40 | }
41 |
42 | public double adiposeMassPrediction(double heightStature) {
43 | double sAdipose = getPliegueTriceps() + getPliegueSubescapular() + getPliegueSupraespinal() + getPliegueAbdominal() + getPliegueAnteriorMuslo() + getPliegueMedialPierna();
44 | double scoreZAdiposeMass, adiposeMass;
45 | double phantomHeight = 170.18;
46 | double sumPhantomFolds = 116.41;
47 | double sumOfDEPhantomFolds = 34.79;
48 | double standardDeviationPhantomAdiposeMass = 5.85;
49 | double PhantomValueSpecificAdiposeMass = 25.6;
50 |
51 | scoreZAdiposeMass = (sAdipose * (phantomHeight / heightStature) - sumPhantomFolds) / sumOfDEPhantomFolds;
52 | adiposeMass = (scoreZAdiposeMass * standardDeviationPhantomAdiposeMass + PhantomValueSpecificAdiposeMass) / Math.pow((phantomHeight / heightStature), 3);
53 |
54 | System.out.printf("2. Prediccion masa adiposa(Kg): %.2f %n", adiposeMass);
55 | return adiposeMass;
56 | }
57 |
58 | public double muscleMassPrediction(double heightStature, double tricepsFold, double subscapularFold, double anteriorThighFold, double medialLegFold) {
59 | double relaxedArmCorrectedByPCT = getPerimetroBrazoRelajado() - (Math.PI * tricepsFold / 10); //PCT Pliegue Cutáneo del Triceps
60 | double forearmNotCorrected = getPerimetroAnteBrazo();
61 | double ribCageCorrectedByPCSE = getPerimetroToracicoMesoesternal() - ((Math.PI * subscapularFold) / 10); //PCSE Pliegue Cutáneo SubEscapular
62 | double thighCorrectedByPCM = getPerimetroMusloA1cm() - ((Math.PI * anteriorThighFold) / 10); //PCM Pliegue cutáneo Muslo anterior
63 | double calfCorrectedByPCP = getPerimetroPiernaMaximo() - ((Math.PI * medialLegFold) / 10);//Pliegue Cutáneo Pantorrilla
64 | double sMuscular = relaxedArmCorrectedByPCT + forearmNotCorrected + ribCageCorrectedByPCSE
65 | + thighCorrectedByPCM + calfCorrectedByPCP;
66 |
67 | double scoreZMuscleMass, muscleMass;
68 | double phantomHeight = 170.18;
69 | double sumPhantomPerimeters = 207.21;
70 | double sumOfDEPhantomPerimeters = 13.74;
71 | double standardDeviationPhantomMuscleMass = 5.4;
72 | double PhantomValueSpecificMuscleMass = 24.5;
73 |
74 | scoreZMuscleMass = (sMuscular * (phantomHeight / heightStature) - sumPhantomPerimeters) / sumOfDEPhantomPerimeters;
75 | muscleMass = (scoreZMuscleMass * standardDeviationPhantomMuscleMass + PhantomValueSpecificMuscleMass) / Math.pow((phantomHeight / heightStature), 3);
76 |
77 | /*System.out.printf("\nBrazo relajado corregidos: %.2f %n",relaxedArmCorrectedByPCT);
78 | System.out.printf("Antebrazo no corregidos: %.2f %n",forearmNotCorrected);
79 | System.out.printf("Caja toracica corregidos: %.2f %n",ribCageCorrectedByPCSE);
80 | System.out.printf("Muslo corregidos: %.2f %n",thighCorrectedByPCM);
81 | System.out.printf("\nSuma perimetros corregidos: %.2f %n",summationOfPerimeters);
82 | System.out.printf("Indice proporcionalidad Z masa muscular: %.2f %n",scoreZMuscleMass);*/
83 | System.out.printf("3. Prediccion masa muscular(Kg): %.2f %n", muscleMass);
84 | return muscleMass;
85 | }
86 |
87 | public double boneMassPrediction(double heightStature, double headPerimeter) {
88 | double scoreZBoneMassHead, boneMassHead, scoreZBoneMassBody, boneMassBody, totalBoneMass;
89 | double standardDeviationPhantomPerimeterForHead = 1.44;
90 | double perimeterHeadModelPhantom = 56;
91 | double standardDeviationboneMassHead = 0.18;
92 | double BoneMassHeadPhantom = 1.2;
93 | double phantomHeight = 170.18;
94 | double sumPhantomDiameters = 98.88;
95 | double sumOfDEPhantomDiameters = 5.33;
96 | double standardDeviationPhantomBoneMass = 1.34;
97 | double PhantomValueSpecificBoneMass = 6.7;
98 | double sBoneBody;
99 |
100 | scoreZBoneMassHead = (headPerimeter - perimeterHeadModelPhantom) / standardDeviationPhantomPerimeterForHead;
101 | boneMassHead = scoreZBoneMassHead * standardDeviationboneMassHead + BoneMassHeadPhantom;
102 |
103 | sBoneBody = getDiametroBiacromial() + getDiametroBiiliocrestal() + 2 * getDiametroBiepicondileoHumeral() + 2 * getDiametroBiepicondileoFemoral();
104 | scoreZBoneMassBody = (sBoneBody * (phantomHeight / heightStature) - sumPhantomDiameters) / sumOfDEPhantomDiameters;
105 | boneMassBody = (scoreZBoneMassBody * standardDeviationPhantomBoneMass + PhantomValueSpecificBoneMass) / Math.pow((phantomHeight / heightStature), 3);
106 |
107 | totalBoneMass = boneMassHead + boneMassBody;
108 | System.out.printf("4. Prediccion masa ósea total(Kg): %.2f %n", totalBoneMass);
109 | return totalBoneMass;
110 |
111 | }
112 |
113 | public double residualMassPrediction(double sittingSize, double waistPerimeter, double abdominalFold) {
114 | double waistPerimeterCorrectedByPCA = waistPerimeter - (Math.PI * abdominalFold / 10); //PCA - ¨liegue Cutáneo Abdominal
115 | double scoreZResidualMass, residualMass;
116 | double sResidual = getDiametroAnteroPosteriorToraxPecho()
117 | + getDiametroTrasversoToraxMesoesternal() + waistPerimeterCorrectedByPCA;
118 | double phantomSittingSize = 89.92;
119 | double sumPhantomVariables = 109.35;
120 | double sumOfDEPhantomVariables = 7.08;
121 | double standardDeviationPhantomResidualMass = 1.24;
122 | double PhantomValueSpecificResidualMass = 6.1;
123 |
124 | scoreZResidualMass = (sResidual * (phantomSittingSize / sittingSize) - sumPhantomVariables) / sumOfDEPhantomVariables;
125 | residualMass = (scoreZResidualMass * standardDeviationPhantomResidualMass + PhantomValueSpecificResidualMass) / Math.pow((phantomSittingSize / sittingSize), 3);
126 |
127 | System.out.printf("5. Prediccion masa residual(Kg): %.2f %n", residualMass);
128 | return residualMass;
129 | }
130 |
131 | public double predictionTotalBodyMass(double weight, double skinMass, double adiposeMass, double muscleMass, double totalBoneMass, double residualMass) {
132 | double totalBodyMass, predictiveTotalBodyMass, skinMassAdjusted, adiposeMassAdjusted;
133 | double muscleMassAdjusted, totalBoneMassAdjusted, residualMassAdjusted, predictiveTotalBodyMassLessActualWeight;
134 |
135 | predictiveTotalBodyMass = skinMass + adiposeMass + muscleMass + totalBoneMass + residualMass;
136 | //System.out.println(skinMass +"\n" + adiposeMass +"\n" + muscleMass +"\n" + totalBoneMass +"\n" + residualMass);
137 |
138 | predictiveTotalBodyMassLessActualWeight = predictiveTotalBodyMass - weight;
139 | //System.out.println(predictiveTotalBodyMassLessActualWeight);
140 |
141 | skinMassAdjusted = skinMass - (predictiveTotalBodyMassLessActualWeight * skinMass / predictiveTotalBodyMass);
142 | adiposeMassAdjusted = adiposeMass - (predictiveTotalBodyMassLessActualWeight * adiposeMass / predictiveTotalBodyMass);
143 | muscleMassAdjusted = muscleMass - (predictiveTotalBodyMassLessActualWeight * muscleMass / predictiveTotalBodyMass);
144 | totalBoneMassAdjusted = totalBoneMass - (predictiveTotalBodyMassLessActualWeight * totalBoneMass / predictiveTotalBodyMass);
145 | residualMassAdjusted = residualMass - (predictiveTotalBodyMassLessActualWeight * residualMass / predictiveTotalBodyMass);
146 |
147 | totalBodyMass = skinMassAdjusted + adiposeMassAdjusted + muscleMassAdjusted + totalBoneMassAdjusted + residualMassAdjusted;
148 | System.out.printf("Prediccion masa corporal total(Kg): %.2f %n", totalBodyMass);//predictiveTotalBodyMass);
149 | return totalBodyMass;
150 | }
151 |
152 | public double totalSum(double a, double b, double c, double d, double e) {
153 | double totalSum;
154 |
155 | totalSum = a + b + c + d + e;
156 |
157 | System.out.printf("Total sumatoria: %.2f %n", totalSum);
158 | return totalSum;
159 | }
160 |
161 | /* ----------- BUILDER ------------------------------------------------------------------------------------------------------*/
162 | public CalculateAnthropometry() {
163 | }
164 |
165 | public CalculateAnthropometry(double peso, double tallaAltura, double tallaSentado,
166 | double envergaduraBrazos) {
167 |
168 | super(peso, tallaAltura, tallaSentado, envergaduraBrazos);
169 | }
170 |
171 | public CalculateAnthropometry(double pliegueTriceps, double pliegueSubescapular,
172 | double pliegueBiceps, double pliegueCrestaIliaca, double pliegueSupraespinal,
173 | double pliegueAbdominal, double pliegueAnteriorMuslo, double pliegueMedialPierna,
174 | double plieguePectoral) {
175 |
176 | super(pliegueTriceps, pliegueSubescapular, pliegueBiceps, pliegueCrestaIliaca,
177 | pliegueSupraespinal, pliegueAbdominal, pliegueAnteriorMuslo,
178 | pliegueMedialPierna, plieguePectoral);
179 | }
180 |
181 | public CalculateAnthropometry(double perimetroCabeza, double perimetroCuello,
182 | double perimetroBrazoRelajado, double perimetroBrazoFlexionado,
183 | double perimetroAnteBrazo, double perimetroMuñeca,
184 | double perimetroToracicoMesoesternal, double perimetroAbdominalCinturaMinimo,
185 | double perimetroAbdominal, double perimetroGluteoCaderaMaximo,
186 | double perimetroMusloA1cm, double perimetroMusloTercioMedio,
187 | double perimetroPiernaMaximo, double perimetroTobilloMinimo) {
188 |
189 | super(perimetroCabeza, perimetroCuello, perimetroBrazoRelajado,
190 | perimetroBrazoFlexionado, perimetroAnteBrazo, perimetroMuñeca,
191 | perimetroToracicoMesoesternal, perimetroAbdominalCinturaMinimo,
192 | perimetroAbdominal, perimetroGluteoCaderaMaximo, perimetroMusloA1cm,
193 | perimetroMusloTercioMedio, perimetroPiernaMaximo, perimetroTobilloMinimo);
194 | }
195 |
196 | public CalculateAnthropometry(double diametroBiacromial,
197 | double diametroAnteroPosteriorAbdominal, double diametroBiiliocrestal,
198 | double diametroTrasversoToraxMesoesternal, double diametroAnteroPosteriorToraxPecho,
199 | double diametroBiepicondileoHumeral, double diametroBiestiloideoMuñeca,
200 | double diametroBiepicondileoFemoral) {
201 |
202 | super(diametroBiacromial, diametroAnteroPosteriorAbdominal,
203 | diametroBiiliocrestal, diametroTrasversoToraxMesoesternal,
204 | diametroAnteroPosteriorToraxPecho, diametroBiepicondileoHumeral,
205 | diametroBiestiloideoMuñeca, diametroBiepicondileoFemoral);
206 | }
207 |
208 | //Constructor todas las mediciones
209 | public CalculateAnthropometry(double peso, double tallaAltura, double tallaSentado,
210 | double envergaduraBrazos, double pliegueTriceps, double pliegueSubescapular,
211 | double pliegueBiceps, double pliegueCrestaIliaca, double pliegueSupraespinal,
212 | double pliegueAbdominal, double pliegueAnteriorMuslo, double pliegueMedialPierna,
213 | double plieguePectoral, double perimetroCabeza, double perimetroCuello,
214 | double perimetroBrazoRelajado, double perimetroBrazoFlexionado,
215 | double perimetroAnteBrazo, double perimetroMuñeca, double perimetroToracicoMesoesternal,
216 | double perimetroAbdominalCinturaMinimo, double perimetroAbdominal,
217 | double perimetroGluteoCaderaMaximo, double perimetroMusloA1cm,
218 | double perimetroMusloTercioMedio, double perimetroPiernaMaximo,
219 | double perimetroTobilloMinimo, double diametroBiacromial,
220 | double diametroAnteroPosteriorAbdominal, double diametroBiiliocrestal,
221 | double diametroTrasversoToraxMesoesternal, double diametroAnteroPosteriorToraxPecho,
222 | double diametroBiepicondileoHumeral, double diametroBiestiloideoMuñeca,
223 | double diametroBiepicondileoFemoral) {
224 |
225 | super(peso, tallaAltura, tallaSentado, envergaduraBrazos, pliegueTriceps,
226 | pliegueSubescapular, pliegueBiceps, pliegueCrestaIliaca,
227 | pliegueSupraespinal, pliegueAbdominal, pliegueAnteriorMuslo,
228 | pliegueMedialPierna, plieguePectoral, perimetroCabeza, perimetroCuello,
229 | perimetroBrazoRelajado, perimetroBrazoFlexionado, perimetroAnteBrazo,
230 | perimetroMuñeca, perimetroToracicoMesoesternal, perimetroAbdominalCinturaMinimo,
231 | perimetroAbdominal, perimetroGluteoCaderaMaximo, perimetroMusloA1cm,
232 | perimetroMusloTercioMedio, perimetroPiernaMaximo, perimetroTobilloMinimo,
233 | diametroBiacromial, diametroAnteroPosteriorAbdominal, diametroBiiliocrestal,
234 | diametroTrasversoToraxMesoesternal, diametroAnteroPosteriorToraxPecho,
235 | diametroBiepicondileoHumeral, diametroBiestiloideoMuñeca,
236 | diametroBiepicondileoFemoral);
237 | }
238 | /* ----------- SETTERS & GETTERS --------------------------------------------------------------------------------------------*/
239 |
240 | }
241 |
--------------------------------------------------------------------------------
/BodyMeter/src/UI/PatientPrincipalScreen.form:
--------------------------------------------------------------------------------
1 |
2 |
3 |
277 |
--------------------------------------------------------------------------------
/BodyMeter/src/UI/PatientPrincipalScreen.java:
--------------------------------------------------------------------------------
1 | package UI;
2 |
3 |
4 | import data.User;
5 | import java.awt.Image;
6 | import java.util.HashMap;
7 | import java.util.logging.Level;
8 | import java.util.logging.Logger;
9 | import javax.swing.*;
10 | import javax.swing.table.DefaultTableModel;
11 | import logicBusiness.Login;
12 |
13 | /*
14 | * @author ANONYMOUS
15 | * @author JULIAN C
16 | * @author DANIEL R
17 | * @author JUAN B
18 | */
19 | public class PatientPrincipalScreen extends javax.swing.JFrame {
20 |
21 | private final User users = new User();
22 | private final Login login = new Login();
23 | private HashMap listOfPatients = new HashMap<>();
24 | private HashMap loginList = new HashMap<>();
25 | private HashMap patients = null;
26 |
27 |
28 | DefaultTableModel modelo;
29 |
30 | private String searchText = "";
31 |
32 | public PatientPrincipalScreen() {
33 | initComponents();
34 | setLocationRelativeTo(null);
35 | setResizable(false);
36 | double mesomorfia = 0;
37 | double endomorfia = 0;
38 | double ectomorfia = 0;
39 | double transformadaX = (270 + 37*(ectomorfia - endomorfia));
40 | double transformadaY = (180 + 12*(ectomorfia + endomorfia - mesomorfia));
41 | int posX = (int)transformadaX;
42 | int posY = (int)transformadaY;
43 |
44 | //loadPatient("");
45 |
46 | setIconImage(new ImageIcon(getClass().getResource("/resources/img/icono.jpg")).getImage());
47 |
48 | ((JPanel) getContentPane()).setOpaque(false);
49 | ImageIcon background = new ImageIcon(this.getClass().getResource("/resources/img/logotipoH.jpg"));
50 |
51 | background = new ImageIcon(background.getImage().getScaledInstance(getWidth() / 4, getHeight() / 8, Image.SCALE_SMOOTH));
52 |
53 | JLabel fondo = new JLabel();
54 | fondo.setIcon(background);
55 |
56 | jPanelBase.add(fondo, JLayeredPane.FRAME_CONTENT_LAYER);
57 | fondo.setBounds(550, 12, background.getIconWidth(), background.getIconHeight());
58 |
59 | // Resultado en somatotipo
60 |
61 | ImageIcon somatotip = new ImageIcon(this.getClass().getResource("/resources/img/Somatotipo.jpg"));
62 |
63 | somatotip = new ImageIcon(somatotip.getImage().getScaledInstance(600, 340, Image.SCALE_SMOOTH));
64 |
65 | JLabel somatotipScreen = new JLabel();
66 | somatotipScreen.setIcon(somatotip);
67 |
68 | jpanelScore.add(somatotipScreen, JLayeredPane.FRAME_CONTENT_LAYER);
69 | somatotipScreen.setBounds(0, 0, somatotip.getIconWidth(), somatotip.getIconHeight() );
70 |
71 | // Ubicador
72 |
73 | ImageIcon ubicador = new ImageIcon(this.getClass().getResource("/resources/img/ubicador.jpg"));
74 |
75 | ubicador = new ImageIcon(ubicador.getImage().getScaledInstance( 10, 10, Image.SCALE_SMOOTH));
76 |
77 | JLabel locator = new JLabel();
78 | locator.setIcon(ubicador);
79 |
80 | jpanelLocator.add(locator, JLayeredPane.FRAME_CONTENT_LAYER);
81 | locator.setBounds(posX, posY, ubicador.getIconWidth(),ubicador.getIconHeight() );
82 |
83 |
84 | try {
85 | users.readDatabase();
86 | login.readDatabase();
87 | listOfPatients = users.getListOfPatientData();
88 | loginList = login.getUserLoginList();
89 |
90 | String[] loginData = loginList.get(LoginScreen.getUser());
91 | String[] userData = listOfPatients.get(loginData[0]);
92 |
93 | //System.out.println("INFO USER: " + Arrays.toString(loginData) + Arrays.toString(userData));
94 | jLabelName.setText(userData[1] + " " + userData[2]);
95 |
96 | //txtLastnames.setText(userData[2]);
97 | } catch (Exception ex) {
98 | Logger.getLogger(EditUserProfile.class.getName()).log(Level.SEVERE, null, ex);
99 | }
100 |
101 | }
102 |
103 | private void loadPatient(String buscar) {
104 |
105 | }
106 | /*
107 | * This method is called from within the constructor to initialize the form.
108 | * WARNING: Do NOT modify this code. The content of this method is always
109 | * regenerated by the Form Editor.
110 | */
111 | @SuppressWarnings("unchecked")
112 | // //GEN-BEGIN:initComponents
113 | private void initComponents() {
114 |
115 | buttonGroup1 = new javax.swing.ButtonGroup();
116 | jPanelBase = new javax.swing.JPanel();
117 | jPanel1 = new javax.swing.JPanel();
118 | jLabelUserType = new javax.swing.JLabel();
119 | jLabelName = new javax.swing.JLabel();
120 | btnLogout = new javax.swing.JButton();
121 | btnEditUserProfile = new javax.swing.JButton();
122 | jPanelSignUpTitle = new javax.swing.JPanel();
123 | jLabel3 = new javax.swing.JLabel();
124 | jpanelScore = new javax.swing.JPanel();
125 | jpanelLocator = new javax.swing.JPanel();
126 |
127 | setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
128 |
129 | jPanelBase.setOpaque(false);
130 |
131 | jPanel1.setBorder(javax.swing.BorderFactory.createEtchedBorder());
132 |
133 | jLabelUserType.setBackground(new java.awt.Color(255, 204, 204));
134 | jLabelUserType.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
135 | jLabelUserType.setText("PACIENTE");
136 | jLabelUserType.setBorder(javax.swing.BorderFactory.createEtchedBorder());
137 | jLabelUserType.setOpaque(true);
138 |
139 | jLabelName.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
140 | jLabelName.setText("Nombre");
141 |
142 | btnLogout.setBackground(new java.awt.Color(255, 204, 204));
143 | btnLogout.setFont(new java.awt.Font("Tahoma", 0, 16)); // NOI18N
144 | btnLogout.setText("Cerrar Sesión");
145 | btnLogout.setBorder(javax.swing.BorderFactory.createEtchedBorder());
146 | btnLogout.addActionListener(new java.awt.event.ActionListener() {
147 | public void actionPerformed(java.awt.event.ActionEvent evt) {
148 | btnLogoutActionPerformed(evt);
149 | }
150 | });
151 |
152 | btnEditUserProfile.setFont(new java.awt.Font("Tahoma", 0, 16)); // NOI18N
153 | btnEditUserProfile.setText("Editar perfil");
154 | btnEditUserProfile.addActionListener(new java.awt.event.ActionListener() {
155 | public void actionPerformed(java.awt.event.ActionEvent evt) {
156 | btnEditUserProfileActionPerformed(evt);
157 | }
158 | });
159 |
160 | javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
161 | jPanel1.setLayout(jPanel1Layout);
162 | jPanel1Layout.setHorizontalGroup(
163 | jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
164 | .addComponent(jLabelUserType, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
165 | .addGroup(jPanel1Layout.createSequentialGroup()
166 | .addContainerGap()
167 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
168 | .addComponent(jLabelName, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
169 | .addGroup(jPanel1Layout.createSequentialGroup()
170 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
171 | .addComponent(btnEditUserProfile, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
172 | .addComponent(btnLogout, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 132, Short.MAX_VALUE))
173 | .addGap(0, 23, Short.MAX_VALUE)))
174 | .addContainerGap())
175 | );
176 | jPanel1Layout.setVerticalGroup(
177 | jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
178 | .addGroup(jPanel1Layout.createSequentialGroup()
179 | .addComponent(jLabelUserType, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)
180 | .addGap(22, 22, 22)
181 | .addComponent(jLabelName, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
182 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 148, Short.MAX_VALUE)
183 | .addComponent(btnEditUserProfile, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)
184 | .addGap(36, 36, 36)
185 | .addComponent(btnLogout, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)
186 | .addContainerGap())
187 | );
188 |
189 | jPanelSignUpTitle.setBackground(new java.awt.Color(0, 255, 102));
190 |
191 | jLabel3.setBackground(new java.awt.Color(102, 255, 102));
192 | jLabel3.setFont(new java.awt.Font("Tahoma", 0, 24)); // NOI18N
193 | jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
194 | jLabel3.setText("BODYMETRIC");
195 |
196 | javax.swing.GroupLayout jPanelSignUpTitleLayout = new javax.swing.GroupLayout(jPanelSignUpTitle);
197 | jPanelSignUpTitle.setLayout(jPanelSignUpTitleLayout);
198 | jPanelSignUpTitleLayout.setHorizontalGroup(
199 | jPanelSignUpTitleLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
200 | .addGroup(jPanelSignUpTitleLayout.createSequentialGroup()
201 | .addGap(93, 93, 93)
202 | .addComponent(jLabel3)
203 | .addContainerGap(105, Short.MAX_VALUE))
204 | );
205 | jPanelSignUpTitleLayout.setVerticalGroup(
206 | jPanelSignUpTitleLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
207 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelSignUpTitleLayout.createSequentialGroup()
208 | .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
209 | .addComponent(jLabel3)
210 | .addContainerGap())
211 | );
212 |
213 | jpanelLocator.setOpaque(false);
214 |
215 | javax.swing.GroupLayout jpanelLocatorLayout = new javax.swing.GroupLayout(jpanelLocator);
216 | jpanelLocator.setLayout(jpanelLocatorLayout);
217 | jpanelLocatorLayout.setHorizontalGroup(
218 | jpanelLocatorLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
219 | .addGap(0, 584, Short.MAX_VALUE)
220 | );
221 | jpanelLocatorLayout.setVerticalGroup(
222 | jpanelLocatorLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
223 | .addGap(0, 326, Short.MAX_VALUE)
224 | );
225 |
226 | javax.swing.GroupLayout jpanelScoreLayout = new javax.swing.GroupLayout(jpanelScore);
227 | jpanelScore.setLayout(jpanelScoreLayout);
228 | jpanelScoreLayout.setHorizontalGroup(
229 | jpanelScoreLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
230 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jpanelScoreLayout.createSequentialGroup()
231 | .addContainerGap()
232 | .addComponent(jpanelLocator, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
233 | .addContainerGap())
234 | );
235 | jpanelScoreLayout.setVerticalGroup(
236 | jpanelScoreLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
237 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jpanelScoreLayout.createSequentialGroup()
238 | .addContainerGap()
239 | .addComponent(jpanelLocator, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
240 | .addContainerGap())
241 | );
242 |
243 | javax.swing.GroupLayout jPanelBaseLayout = new javax.swing.GroupLayout(jPanelBase);
244 | jPanelBase.setLayout(jPanelBaseLayout);
245 | jPanelBaseLayout.setHorizontalGroup(
246 | jPanelBaseLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
247 | .addGroup(jPanelBaseLayout.createSequentialGroup()
248 | .addGroup(jPanelBaseLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
249 | .addGroup(jPanelBaseLayout.createSequentialGroup()
250 | .addGap(28, 28, 28)
251 | .addComponent(jPanelSignUpTitle, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
252 | .addGroup(jPanelBaseLayout.createSequentialGroup()
253 | .addContainerGap()
254 | .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
255 | .addGap(71, 71, 71)
256 | .addComponent(jpanelScore, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
257 | .addContainerGap(176, Short.MAX_VALUE))
258 | );
259 | jPanelBaseLayout.setVerticalGroup(
260 | jPanelBaseLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
261 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelBaseLayout.createSequentialGroup()
262 | .addContainerGap()
263 | .addComponent(jPanelSignUpTitle, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
264 | .addGroup(jPanelBaseLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
265 | .addGroup(jPanelBaseLayout.createSequentialGroup()
266 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
267 | .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
268 | .addGap(101, 101, 101))
269 | .addGroup(jPanelBaseLayout.createSequentialGroup()
270 | .addGap(31, 31, 31)
271 | .addComponent(jpanelScore, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
272 | .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
273 | );
274 |
275 | javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
276 | getContentPane().setLayout(layout);
277 | layout.setHorizontalGroup(
278 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
279 | .addComponent(jPanelBase, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
280 | );
281 | layout.setVerticalGroup(
282 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
283 | .addGroup(layout.createSequentialGroup()
284 | .addComponent(jPanelBase, javax.swing.GroupLayout.PREFERRED_SIZE, 442, javax.swing.GroupLayout.PREFERRED_SIZE)
285 | .addGap(0, 11, Short.MAX_VALUE))
286 | );
287 |
288 | pack();
289 | }// //GEN-END:initComponents
290 |
291 | private void btnLogoutActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnLogoutActionPerformed
292 | // TODO add your handling code here:
293 | this.setVisible(false);
294 | LoginScreen lgScreen = new LoginScreen();
295 | lgScreen.setVisible(true);
296 | }//GEN-LAST:event_btnLogoutActionPerformed
297 |
298 | private void btnEditUserProfileActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnEditUserProfileActionPerformed
299 | EditUserProfile ep = new EditUserProfile();
300 | ep.setVisible(true);
301 | ep.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
302 | }//GEN-LAST:event_btnEditUserProfileActionPerformed
303 |
304 |
305 |
306 | // Variables declaration - do not modify//GEN-BEGIN:variables
307 | private javax.swing.JButton btnEditUserProfile;
308 | private javax.swing.JButton btnLogout;
309 | private javax.swing.ButtonGroup buttonGroup1;
310 | private javax.swing.JLabel jLabel3;
311 | private javax.swing.JLabel jLabelName;
312 | private javax.swing.JLabel jLabelUserType;
313 | private javax.swing.JPanel jPanel1;
314 | private javax.swing.JPanel jPanelBase;
315 | private javax.swing.JPanel jPanelSignUpTitle;
316 | private javax.swing.JPanel jpanelLocator;
317 | private javax.swing.JPanel jpanelScore;
318 | // End of variables declaration//GEN-END:variables
319 | }
320 |
--------------------------------------------------------------------------------
/BodyMeter/src/UI/LoginScreen.java:
--------------------------------------------------------------------------------
1 | package UI;
2 |
3 | import data.User;
4 | import java.awt.Image;
5 | import java.util.HashMap;
6 | import java.util.logging.Level;
7 | import java.util.logging.Logger;
8 | import javax.swing.*;
9 | import logicBusiness.Login;
10 |
11 | /*
12 | * @author ANONYMOUS
13 | * @author JULIAN C
14 | * @author DANIEL R
15 | * @author JUAN B
16 | */
17 | public class LoginScreen extends javax.swing.JFrame {
18 |
19 | /*
20 | * Creates new form Login
21 | */
22 | private final Login login = new Login();
23 | private static String user;
24 | private String password = "";
25 | private int failedAttempt = 0;
26 | private static String loged;
27 |
28 | public LoginScreen() {
29 | initComponents();
30 | setLocationRelativeTo(null); //To center window
31 | setResizable(false);
32 | //jLabelLogin.setText("Hola");
33 | setIconImage(new ImageIcon(getClass().getResource("/resources/img/icono.jpg")).getImage());
34 |
35 | ((JPanel) getContentPane()).setOpaque(false);
36 | ImageIcon background = new ImageIcon(this.getClass().getResource("/resources/img/logotipoV.jpg"));
37 |
38 | background = new ImageIcon(background.getImage().getScaledInstance(getWidth() / 2, 350,
39 | Image.SCALE_SMOOTH));
40 |
41 | JLabel fondo = new JLabel();
42 | fondo.setIcon(background);
43 |
44 | getLayeredPane().add(fondo, JLayeredPane.FRAME_CONTENT_LAYER);
45 | fondo.setBounds(30, 30, background.getIconWidth(), background.getIconHeight());
46 | }
47 |
48 | /**
49 | * This method is called from within the constructor to initialize the form.
50 | * WARNING: Do NOT modify this code. The content of this method is always
51 | * regenerated by the Form Editor.
52 | */
53 | @SuppressWarnings("unchecked")
54 | // //GEN-BEGIN:initComponents
55 | private void initComponents() {
56 |
57 | jPanelLoginBox = new javax.swing.JPanel();
58 | titleBox_jPanel = new javax.swing.JPanel();
59 | jLabelLogin = new javax.swing.JLabel();
60 | jPanelUserPassBox = new javax.swing.JPanel();
61 | jLabelUsuario = new javax.swing.JLabel();
62 | jLabelPassword = new javax.swing.JLabel();
63 | txtPasswordField = new javax.swing.JPasswordField();
64 | txtUser = new javax.swing.JTextField();
65 | btnSignUp = new javax.swing.JButton();
66 | btnLogIn = new javax.swing.JButton();
67 | jPanel1 = new javax.swing.JPanel();
68 | jLabelErrorLogin = new javax.swing.JLabel();
69 |
70 | setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
71 |
72 | jPanelLoginBox.setOpaque(false);
73 |
74 | titleBox_jPanel.setBackground(new java.awt.Color(102, 255, 102));
75 |
76 | jLabelLogin.setFont(new java.awt.Font("Tahoma", 0, 24)); // NOI18N
77 | jLabelLogin.setText("Iniciar Sesión");
78 |
79 | javax.swing.GroupLayout titleBox_jPanelLayout = new javax.swing.GroupLayout(titleBox_jPanel);
80 | titleBox_jPanel.setLayout(titleBox_jPanelLayout);
81 | titleBox_jPanelLayout.setHorizontalGroup(
82 | titleBox_jPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
83 | .addGroup(titleBox_jPanelLayout.createSequentialGroup()
84 | .addGap(61, 61, 61)
85 | .addComponent(jLabelLogin)
86 | .addContainerGap(70, Short.MAX_VALUE))
87 | );
88 | titleBox_jPanelLayout.setVerticalGroup(
89 | titleBox_jPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
90 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, titleBox_jPanelLayout.createSequentialGroup()
91 | .addContainerGap(13, Short.MAX_VALUE)
92 | .addComponent(jLabelLogin)
93 | .addContainerGap())
94 | );
95 |
96 | jPanelUserPassBox.setBackground(new java.awt.Color(204, 204, 204));
97 |
98 | jLabelUsuario.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
99 | jLabelUsuario.setText("Usuario:");
100 |
101 | jLabelPassword.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
102 | jLabelPassword.setText("Contraseña:");
103 |
104 | txtPasswordField.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
105 | txtPasswordField.addKeyListener(new java.awt.event.KeyAdapter() {
106 | public void keyPressed(java.awt.event.KeyEvent evt) {
107 | txtPasswordFieldKeyPressed(evt);
108 | }
109 | });
110 |
111 | txtUser.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
112 | txtUser.addActionListener(new java.awt.event.ActionListener() {
113 | public void actionPerformed(java.awt.event.ActionEvent evt) {
114 | txtUserActionPerformed(evt);
115 | }
116 | });
117 | txtUser.addKeyListener(new java.awt.event.KeyAdapter() {
118 | public void keyPressed(java.awt.event.KeyEvent evt) {
119 | txtUserKeyPressed(evt);
120 | }
121 | });
122 |
123 | javax.swing.GroupLayout jPanelUserPassBoxLayout = new javax.swing.GroupLayout(jPanelUserPassBox);
124 | jPanelUserPassBox.setLayout(jPanelUserPassBoxLayout);
125 | jPanelUserPassBoxLayout.setHorizontalGroup(
126 | jPanelUserPassBoxLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
127 | .addGroup(jPanelUserPassBoxLayout.createSequentialGroup()
128 | .addContainerGap()
129 | .addGroup(jPanelUserPassBoxLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
130 | .addComponent(txtUser, javax.swing.GroupLayout.DEFAULT_SIZE, 249, Short.MAX_VALUE)
131 | .addComponent(jLabelUsuario)
132 | .addComponent(jLabelPassword)
133 | .addComponent(txtPasswordField))
134 | .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
135 | );
136 | jPanelUserPassBoxLayout.setVerticalGroup(
137 | jPanelUserPassBoxLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
138 | .addGroup(jPanelUserPassBoxLayout.createSequentialGroup()
139 | .addContainerGap()
140 | .addComponent(jLabelUsuario)
141 | .addGap(18, 18, 18)
142 | .addComponent(txtUser, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE)
143 | .addGap(27, 27, 27)
144 | .addComponent(jLabelPassword)
145 | .addGap(18, 18, 18)
146 | .addComponent(txtPasswordField, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE)
147 | .addContainerGap(31, Short.MAX_VALUE))
148 | );
149 |
150 | btnSignUp.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
151 | btnSignUp.setText("Registrarse");
152 | btnSignUp.addActionListener(new java.awt.event.ActionListener() {
153 | public void actionPerformed(java.awt.event.ActionEvent evt) {
154 | btnSignUpActionPerformed(evt);
155 | }
156 | });
157 |
158 | btnLogIn.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
159 | btnLogIn.setText("Iniciar Sesión");
160 | btnLogIn.addActionListener(new java.awt.event.ActionListener() {
161 | public void actionPerformed(java.awt.event.ActionEvent evt) {
162 | btnLogInActionPerformed(evt);
163 | }
164 | });
165 |
166 | javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
167 | jPanel1.setLayout(jPanel1Layout);
168 | jPanel1Layout.setHorizontalGroup(
169 | jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
170 | .addComponent(jLabelErrorLogin, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
171 | );
172 | jPanel1Layout.setVerticalGroup(
173 | jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
174 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
175 | .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
176 | .addComponent(jLabelErrorLogin, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)
177 | .addContainerGap())
178 | );
179 |
180 | javax.swing.GroupLayout jPanelLoginBoxLayout = new javax.swing.GroupLayout(jPanelLoginBox);
181 | jPanelLoginBox.setLayout(jPanelLoginBoxLayout);
182 | jPanelLoginBoxLayout.setHorizontalGroup(
183 | jPanelLoginBoxLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
184 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelLoginBoxLayout.createSequentialGroup()
185 | .addGroup(jPanelLoginBoxLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
186 | .addGroup(jPanelLoginBoxLayout.createSequentialGroup()
187 | .addGap(0, 468, Short.MAX_VALUE)
188 | .addComponent(titleBox_jPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
189 | .addGroup(jPanelLoginBoxLayout.createSequentialGroup()
190 | .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
191 | .addGroup(jPanelLoginBoxLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
192 | .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
193 | .addComponent(btnSignUp, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 119, javax.swing.GroupLayout.PREFERRED_SIZE)
194 | .addComponent(jPanelUserPassBox, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
195 | .addComponent(btnLogIn, javax.swing.GroupLayout.DEFAULT_SIZE, 269, Short.MAX_VALUE))))
196 | .addGap(50, 50, 50))
197 | );
198 | jPanelLoginBoxLayout.setVerticalGroup(
199 | jPanelLoginBoxLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
200 | .addGroup(jPanelLoginBoxLayout.createSequentialGroup()
201 | .addContainerGap()
202 | .addComponent(titleBox_jPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
203 | .addGap(18, 18, 18)
204 | .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
205 | .addGap(9, 9, 9)
206 | .addComponent(jPanelUserPassBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
207 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 29, Short.MAX_VALUE)
208 | .addComponent(btnLogIn, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE)
209 | .addGap(18, 18, 18)
210 | .addComponent(btnSignUp)
211 | .addGap(22, 22, 22))
212 | );
213 |
214 | javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
215 | getContentPane().setLayout(layout);
216 | layout.setHorizontalGroup(
217 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
218 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
219 | .addContainerGap(15, Short.MAX_VALUE)
220 | .addComponent(jPanelLoginBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
221 | .addContainerGap())
222 | );
223 | layout.setVerticalGroup(
224 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
225 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
226 | .addContainerGap(22, Short.MAX_VALUE)
227 | .addComponent(jPanelLoginBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
228 | .addContainerGap())
229 | );
230 |
231 | pack();
232 | }// //GEN-END:initComponents
233 |
234 | private void txtUserActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtUserActionPerformed
235 | // TODO add your handling code here:
236 | }//GEN-LAST:event_txtUserActionPerformed
237 |
238 | private void btnSignUpActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSignUpActionPerformed
239 | // TODO add your handling code here:
240 | setVisible(false);
241 | UserRegisterScreen ur = new UserRegisterScreen();
242 | ur.setVisible(true);
243 | ur.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
244 |
245 | }//GEN-LAST:event_btnSignUpActionPerformed
246 |
247 | private void btnLogInActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnLogInActionPerformed
248 |
249 | user = txtUser.getText();
250 | user = user.replaceAll(" ", "").trim().toLowerCase();
251 | password = new String(txtPasswordField.getPassword());
252 |
253 | if ((user.equals("")) && (password.equals(""))) {
254 | jLabelErrorLogin.setText("*Los campos no pueden estar vacíos");
255 | } else {
256 |
257 | try {
258 | login.logIn(user, password);
259 | } catch (Exception ex) {
260 | Logger.getLogger(LoginScreen.class.getName()).log(Level.SEVERE, null, ex);
261 | }
262 |
263 | if (login.isActiveSession() == true) {
264 | setVisible(false);
265 | failedAttempt = 0;
266 | String id = login.getId();
267 | User us = new User();
268 | HashMap listOfNutritionists = new HashMap<>();
269 | HashMap listOfPatientData = new HashMap<>();
270 |
271 | setLoged(id);
272 |
273 | try {
274 | us.readDatabase();
275 | listOfNutritionists = us.getListOfNutritionistsData();
276 | listOfPatientData = us.getListOfPatientData();
277 |
278 | if (listOfNutritionists.containsKey(id)) {
279 | NutritionistPrincipalScreen ps = new NutritionistPrincipalScreen();
280 | ps.setVisible(true);
281 | } else if (listOfPatientData.containsKey(id)) {
282 | PatientPrincipalScreen pps = new PatientPrincipalScreen();
283 | pps.setVisible(true);
284 | }
285 |
286 | } catch (Exception ex) {
287 | Logger.getLogger(LoginScreen.class.getName()).log(Level.SEVERE, null, ex);
288 | }
289 |
290 | } else if (login.isThereIsAUser() == false) {
291 | failedAttempt++;
292 | jLabelErrorLogin.setText("*Usuario y/o contraseña errados");
293 | if (failedAttempt > 2) {
294 | JOptionPane.showMessageDialog(rootPane, "Si no tiene una cuenta,\n resgistrese por favor.");
295 | setVisible(false);
296 | UserRegisterScreen ur = new UserRegisterScreen();
297 | ur.setVisible(true);
298 | ur.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
299 | }
300 | } else {
301 | jLabelErrorLogin.setText("*Usuario y/o contraseña errados");
302 | //JOptionPane.showMessageDialog(null, "Usuario y/o contraseña errados");
303 | System.out.println("Usuario y/o contraseña errados");
304 | txtUser.requestFocus();
305 | txtUser.setText("");
306 | txtPasswordField.setText("");
307 | failedAttempt = 0;
308 | }
309 |
310 | }
311 | }//GEN-LAST:event_btnLogInActionPerformed
312 |
313 | private void txtUserKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtUserKeyPressed
314 | // TODO add your handling code here:
315 | char nextTextField = (char) evt.getKeyCode();
316 | if (nextTextField == evt.VK_ENTER) {
317 | this.txtPasswordField.requestFocus();
318 | }
319 | }//GEN-LAST:event_txtUserKeyPressed
320 |
321 | private void txtPasswordFieldKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtPasswordFieldKeyPressed
322 | char validate = (char) evt.getKeyCode();
323 | if (validate == evt.VK_ENTER) {
324 |
325 | user = txtUser.getText();
326 | user = user.replaceAll(" ", "").trim().toLowerCase();
327 | password = new String(txtPasswordField.getPassword());
328 |
329 | if ((user.equals("")) && (password.equals(""))) {
330 | jLabelErrorLogin.setText("*Los campos no pueden estar vacíos");
331 | } else {
332 |
333 | try {
334 | login.logIn(user, password);
335 | } catch (Exception ex) {
336 | Logger.getLogger(LoginScreen.class.getName()).log(Level.SEVERE, null, ex);
337 | }
338 |
339 | if (login.isActiveSession() == true) {
340 | setVisible(false);
341 | failedAttempt = 0;
342 | String id = login.getId();
343 | User us = new User();
344 | HashMap listOfNutritionists = new HashMap<>();
345 | HashMap listOfPatientData = new HashMap<>();
346 |
347 | setLoged(id);
348 |
349 | try {
350 | us.readDatabase();
351 | listOfNutritionists = us.getListOfNutritionistsData();
352 | listOfPatientData = us.getListOfPatientData();
353 |
354 | if (listOfNutritionists.containsKey(id)) {
355 | NutritionistPrincipalScreen nps = new NutritionistPrincipalScreen();
356 | nps.setVisible(true);
357 | } else if (listOfPatientData.containsKey(id)) {
358 | PatientPrincipalScreen pps = new PatientPrincipalScreen();
359 | pps.setVisible(true);
360 | }
361 |
362 | } catch (Exception ex) {
363 | Logger.getLogger(LoginScreen.class.getName()).log(Level.SEVERE, null, ex);
364 | }
365 |
366 | } else if (login.isThereIsAUser() == false) {
367 | failedAttempt++;
368 | jLabelErrorLogin.setText("*Usuario y/o contraseña errados");
369 | if (failedAttempt > 2) {
370 | JOptionPane.showMessageDialog(rootPane, "Si no tiene una cuenta,\n resgistrese por favor.");
371 | setVisible(false);
372 | UserRegisterScreen ur = new UserRegisterScreen();
373 | ur.setVisible(true);
374 | ur.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
375 | }
376 | } else {
377 | jLabelErrorLogin.setText("*Usuario y/o contraseña errados");
378 | //JOptionPane.showMessageDialog(null, "Usuario y/o contraseña errados");
379 | System.out.println("Usuario y/o contraseña errados");
380 | txtUser.requestFocus();
381 | txtUser.setText("");
382 | txtPasswordField.setText("");
383 | failedAttempt = 0;
384 | }
385 |
386 | }
387 |
388 | }
389 | }//GEN-LAST:event_txtPasswordFieldKeyPressed
390 |
391 | public static String getLoged() {
392 | return loged;
393 | }
394 |
395 | public void setLoged(String loged) {
396 | this.loged = loged;
397 | }
398 |
399 | public static String getUser() {
400 | return user;
401 | }
402 |
403 | public void setUser(String user) {
404 | this.user = user;
405 | }
406 |
407 |
408 | // Variables declaration - do not modify//GEN-BEGIN:variables
409 | private javax.swing.JButton btnLogIn;
410 | private javax.swing.JButton btnSignUp;
411 | private javax.swing.JLabel jLabelErrorLogin;
412 | private javax.swing.JLabel jLabelLogin;
413 | private javax.swing.JLabel jLabelPassword;
414 | private javax.swing.JLabel jLabelUsuario;
415 | private javax.swing.JPanel jPanel1;
416 | private javax.swing.JPanel jPanelLoginBox;
417 | private javax.swing.JPanel jPanelUserPassBox;
418 | private javax.swing.JPanel titleBox_jPanel;
419 | private javax.swing.JPasswordField txtPasswordField;
420 | private javax.swing.JTextField txtUser;
421 | // End of variables declaration//GEN-END:variables
422 | }
423 |
--------------------------------------------------------------------------------
/BodyMeter/src/data/User.java:
--------------------------------------------------------------------------------
1 | package data;
2 |
3 | import java.io.*;
4 | import java.security.MessageDigest;
5 | import java.util.Arrays;
6 | import java.util.Date;
7 | import java.util.HashMap;
8 | import java.util.Map;
9 | import javax.crypto.Cipher;
10 | import javax.crypto.spec.SecretKeySpec;
11 | import logicBusiness.ExportData;
12 |
13 | /*
14 | * @author ANONYMOUS
15 | * @author JULIAN C
16 | * @author DANIEL R
17 | * @author JUAN B
18 | */
19 | public class User implements ExportData {
20 | //
21 | private final String nameDoc = "userProfile.txt";
22 | private final String pathfile = nameDoc;
23 | //private final String pathfile = new File("").getAbsolutePath() + "\\src\\resources\\base\\" + nameDoc;
24 | private String id, user, password, name, lastName, birthdate, phone, email;
25 | private String sex, userType; //Patient == 1
26 |
27 | private BufferedReader bufferRead = null;
28 | private HashMap listOfPatientData = new HashMap<>();
29 | private HashMap listOfNutritionistsData = new HashMap<>();
30 |
31 | /* ----------- BUILDER ----------------------------------------------------*/
32 | public User() {
33 | }
34 |
35 | public User(String user, String password, String id) {
36 | this.user = user;
37 | this.password = password;
38 | this.id = id;
39 | }
40 |
41 | public User(String id, String userType, String name, String lastName, String sex,
42 | String birthdate, String phone, String email) {
43 | this.id = id;
44 | this.userType = userType;
45 | this.name = name;
46 | this.lastName = lastName;
47 | this.sex = sex;
48 | this.birthdate = birthdate;
49 | this.phone = phone;
50 | this.email = email;
51 | }
52 |
53 | /* ----------- METHODS ----------------------------------------------------*/
54 | public Date dateFormat(String date) {
55 | Date dateFormat = null;
56 |
57 | return dateFormat;
58 | }
59 |
60 |
61 | @Override
62 | public void readDatabase() throws IOException, Exception {
63 |
64 | try {
65 | bufferRead = new BufferedReader(new FileReader(pathfile));
66 | String readTextLine, readId, readUserType, readName, readLastname, readSex,
67 | readBirthday, readPhone, readEmail, readAgeOrExperience, readSportOrProfessionalCard;
68 |
69 | while ((readTextLine = bufferRead.readLine()) != null) {
70 |
71 | String[] dataUserArray = readTextLine.split("\t");
72 |
73 | readId = dataUserArray[0];
74 | readId = decrypt(readId);
75 | readUserType = dataUserArray[1];
76 | readUserType = decrypt(readUserType);
77 | readName = dataUserArray[2];
78 | readName = decrypt(readName);
79 | readLastname = dataUserArray[3];
80 | readLastname = decrypt(readLastname);
81 | readSex = dataUserArray[4];
82 | readSex = decrypt(readSex);
83 | readBirthday = dataUserArray[5];
84 | readBirthday = decrypt(readBirthday);
85 | readPhone = dataUserArray[6];
86 | readPhone = decrypt(readPhone);
87 | readEmail = dataUserArray[7];
88 | readEmail = decrypt(readEmail);
89 | readAgeOrExperience = dataUserArray[8];
90 | readAgeOrExperience = decrypt(readAgeOrExperience);
91 | readSportOrProfessionalCard = dataUserArray[9];
92 | readSportOrProfessionalCard = decrypt(readSportOrProfessionalCard);
93 |
94 | if ("1".equals(readUserType)) {
95 | String[] userProfileValue = {readId, readName, readLastname, readSex,
96 | readBirthday, readPhone, readEmail, readAgeOrExperience, readSportOrProfessionalCard};
97 | listOfPatientData.put(readId, userProfileValue);
98 | setListOfPatientData(listOfPatientData);
99 |
100 | System.out.printf("Identificación: %s\t", readId);
101 | System.out.printf(" %s\t", "Paciente");
102 | System.out.printf("Nombre: %s\t", readName);
103 | System.out.printf("Apellido: %s\t", readLastname);
104 |
105 | if ("0".equals(readSex)) {
106 | System.out.printf("Sexo: %s\t", "Femenino");
107 | } else {
108 | System.out.printf("Sexo: %s\t", "Masculino");
109 | }
110 | System.out.printf("F. Nacimiento: %s\t", readBirthday);
111 | System.out.printf("Teléfono: %s\t", readPhone);
112 | System.out.printf("Email: %s\t", readEmail);
113 | System.out.printf("Edad: %s\t", readAgeOrExperience);
114 | if ("0".equals(readSportOrProfessionalCard)) {
115 | System.out.printf("Deportista: %s\n", "Si");
116 | } else {
117 | System.out.printf("Deportista: %s\n", "No");
118 | }
119 | } else if ("0".equals(readUserType)) {
120 | String[] userProfileValue = {readId, readName, readLastname, readSex,
121 | readBirthday, readPhone, readEmail, readAgeOrExperience, readSportOrProfessionalCard};
122 | listOfNutritionistsData.put(readId, userProfileValue);
123 | setListOfNutritionistsData(listOfNutritionistsData);
124 |
125 | System.out.printf("Identificación: %s\t", readId);
126 | System.out.printf(" %s\t", "Nutricionista");
127 | System.out.printf("Nombre: %s\t", readName);
128 | System.out.printf("Apellido: %s\t", readLastname);
129 |
130 | if ("0".equals(readSex)) {
131 | System.out.printf("Sexo: %s\t", "Femenino");
132 | } else {
133 | System.out.printf("Sexo: %s\t", "Masculino");
134 | }
135 | System.out.printf("F. Nacimiento: %s\t", readBirthday);
136 | System.out.printf("Teléfono: %s\t", readPhone);
137 | System.out.printf("Email: %s\t", readEmail);
138 | System.out.printf("Experiencia: %s\t", readAgeOrExperience);
139 | System.out.printf("T. Profesional: %s\n", readSportOrProfessionalCard);
140 |
141 | }
142 | }//End while
143 |
144 | } catch (FileNotFoundException exp) {
145 | System.out.println("Base de datos no encontrada. Se ha creado una nueva.");
146 | createFile(pathfile);
147 | readDatabase();
148 | //System.exit(0);// acaba el programa
149 | }//*/
150 |
151 | setListOfPatientData(listOfPatientData);
152 | setListOfNutritionistsData(listOfNutritionistsData);
153 | }
154 |
155 | @Override
156 | public void saveData() throws Exception {
157 | throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
158 | }
159 |
160 |
161 | @Override
162 | public void deleteDataUser(String idToRemove) throws Exception {
163 | idToRemove = idToRemove.toLowerCase();
164 |
165 | //readDatabase(); OJO HACE ELIMINE TODA LA BASE DE DATOS DE USUARIO
166 |
167 | if (listOfPatientData.containsKey(idToRemove)){
168 | listOfPatientData.remove(idToRemove);
169 |
170 | try (FileWriter fw = new FileWriter(pathfile, false);
171 | PrintWriter writeTXT = new PrintWriter(fw)) {
172 |
173 | for (Map.Entry entry : listOfPatientData.entrySet()) {
174 | String idToSave = entry.getKey();
175 | String[] value = entry.getValue();
176 |
177 | String userTypeToSave = value[1];
178 | String nameToSave = value[2];
179 | String lastnameToSave = value[3];
180 | String sexToSave = value[4];
181 | String birthdayToSave = value[5];
182 | String phoneToSave = value[6];
183 | String emailToSave = value[7];
184 | String ageOrExperienceToSave = value[8];
185 | String sportOrProfessionalCardToSave = value[9];
186 |
187 | writeTXT.print(Arrays.toString(encrypt(idToSave)));
188 | writeTXT.print("\t");
189 | writeTXT.print(Arrays.toString(encrypt(userTypeToSave)));
190 | writeTXT.print("\t");
191 | writeTXT.print(Arrays.toString(encrypt(nameToSave)));
192 | writeTXT.print("\t");
193 | writeTXT.print(Arrays.toString(encrypt(lastnameToSave)));
194 | writeTXT.print("\t");
195 | writeTXT.print(Arrays.toString(encrypt(sexToSave)));
196 | writeTXT.print("\t");
197 | writeTXT.print(Arrays.toString(encrypt(birthdayToSave)));
198 | writeTXT.print("\t");
199 | writeTXT.print(Arrays.toString(encrypt(phoneToSave)));
200 | writeTXT.print("\t");
201 | writeTXT.print(Arrays.toString(encrypt(emailToSave)));
202 | writeTXT.print("\t");
203 | writeTXT.print(Arrays.toString(encrypt(ageOrExperienceToSave)));
204 | writeTXT.print("\t");
205 | writeTXT.println(Arrays.toString(encrypt(sportOrProfessionalCardToSave)));
206 | }
207 | //System.out.print("\nDatos actualizados.");
208 | fw.close();
209 |
210 | } catch (IOException ex) {
211 | System.out.println(ex.getMessage());
212 | }
213 |
214 | try (FileWriter fw = new FileWriter(pathfile, true);
215 | PrintWriter writeTXT = new PrintWriter(fw)) {
216 |
217 | for (Map.Entry entry : listOfNutritionistsData.entrySet()) {
218 | String idToSave = entry.getKey();
219 | String[] value = entry.getValue();
220 |
221 | String userTypeToSave = value[1];
222 | String nameToSave = value[2];
223 | String lastnameToSave = value[3];
224 | String sexToSave = value[4];
225 | String birthdayToSave = value[5];
226 | String phoneToSave = value[6];
227 | String emailToSave = value[7];
228 | String ageOrExperienceToSave = value[8];
229 | String sportOrProfessionalCardToSave = value[9];
230 |
231 | writeTXT.print(Arrays.toString(encrypt(idToSave)));
232 | writeTXT.print("\t");
233 | writeTXT.print(Arrays.toString(encrypt(userTypeToSave)));
234 | writeTXT.print("\t");
235 | writeTXT.print(Arrays.toString(encrypt(nameToSave)));
236 | writeTXT.print("\t");
237 | writeTXT.print(Arrays.toString(encrypt(lastnameToSave)));
238 | writeTXT.print("\t");
239 | writeTXT.print(Arrays.toString(encrypt(sexToSave)));
240 | writeTXT.print("\t");
241 | writeTXT.print(Arrays.toString(encrypt(birthdayToSave)));
242 | writeTXT.print("\t");
243 | writeTXT.print(Arrays.toString(encrypt(phoneToSave)));
244 | writeTXT.print("\t");
245 | writeTXT.print(Arrays.toString(encrypt(emailToSave)));
246 | writeTXT.print("\t");
247 | writeTXT.print(Arrays.toString(encrypt(ageOrExperienceToSave)));
248 | writeTXT.print("\t");
249 | writeTXT.println(Arrays.toString(encrypt(sportOrProfessionalCardToSave)));
250 | }
251 | //System.out.print("\nDatos actualizados.");
252 | fw.close();
253 |
254 | } catch (IOException ex) {
255 | System.out.println(ex.getMessage());
256 | }
257 |
258 | System.out.println("\nDatos eliminados del número identificacion: " + idToRemove);
259 | } else if(listOfNutritionistsData.containsKey(idToRemove)){
260 | //System.out.println("\nEl usuario \'" + userToRemove + "\' no existe");
261 |
262 | try (FileWriter fw = new FileWriter(pathfile, false);
263 | PrintWriter writeTXT = new PrintWriter(fw)) {
264 |
265 | for (Map.Entry entry : listOfNutritionistsData.entrySet()) {
266 | String idToSave = entry.getKey();
267 | String[] value = entry.getValue();
268 |
269 | String userTypeToSave = value[1];
270 | String nameToSave = value[2];
271 | String lastnameToSave = value[3];
272 | String sexToSave = value[4];
273 | String birthdayToSave = value[5];
274 | String phoneToSave = value[6];
275 | String emailToSave = value[7];
276 | String ageOrExperienceToSave = value[8];
277 | String sportOrProfessionalCardToSave = value[9];
278 |
279 | writeTXT.print(Arrays.toString(encrypt(idToSave)));
280 | writeTXT.print("\t");
281 | writeTXT.print(Arrays.toString(encrypt(userTypeToSave)));
282 | writeTXT.print("\t");
283 | writeTXT.print(Arrays.toString(encrypt(nameToSave)));
284 | writeTXT.print("\t");
285 | writeTXT.print(Arrays.toString(encrypt(lastnameToSave)));
286 | writeTXT.print("\t");
287 | writeTXT.print(Arrays.toString(encrypt(sexToSave)));
288 | writeTXT.print("\t");
289 | writeTXT.print(Arrays.toString(encrypt(birthdayToSave)));
290 | writeTXT.print("\t");
291 | writeTXT.print(Arrays.toString(encrypt(phoneToSave)));
292 | writeTXT.print("\t");
293 | writeTXT.print(Arrays.toString(encrypt(emailToSave)));
294 | writeTXT.print("\t");
295 | writeTXT.print(Arrays.toString(encrypt(ageOrExperienceToSave)));
296 | writeTXT.print("\t");
297 | writeTXT.println(Arrays.toString(encrypt(sportOrProfessionalCardToSave)));
298 | }
299 | //System.out.print("\nDatos actualizados.");
300 | fw.close();
301 |
302 | } catch (IOException ex) {
303 | System.out.println(ex.getMessage());
304 | }
305 |
306 | try (FileWriter fw = new FileWriter(pathfile, true);
307 | PrintWriter writeTXT = new PrintWriter(fw)) {
308 |
309 | for (Map.Entry entry : listOfPatientData.entrySet()) {
310 | String idToSave = entry.getKey();
311 | String[] value = entry.getValue();
312 |
313 | String userTypeToSave = value[1];
314 | String nameToSave = value[2];
315 | String lastnameToSave = value[3];
316 | String sexToSave = value[4];
317 | String birthdayToSave = value[5];
318 | String phoneToSave = value[6];
319 | String emailToSave = value[7];
320 | String ageOrExperienceToSave = value[8];
321 | String sportOrProfessionalCardToSave = value[9];
322 |
323 | writeTXT.print(Arrays.toString(encrypt(idToSave)));
324 | writeTXT.print("\t");
325 | writeTXT.print(Arrays.toString(encrypt(userTypeToSave)));
326 | writeTXT.print("\t");
327 | writeTXT.print(Arrays.toString(encrypt(nameToSave)));
328 | writeTXT.print("\t");
329 | writeTXT.print(Arrays.toString(encrypt(lastnameToSave)));
330 | writeTXT.print("\t");
331 | writeTXT.print(Arrays.toString(encrypt(sexToSave)));
332 | writeTXT.print("\t");
333 | writeTXT.print(Arrays.toString(encrypt(birthdayToSave)));
334 | writeTXT.print("\t");
335 | writeTXT.print(Arrays.toString(encrypt(phoneToSave)));
336 | writeTXT.print("\t");
337 | writeTXT.print(Arrays.toString(encrypt(emailToSave)));
338 | writeTXT.print("\t");
339 | writeTXT.print(Arrays.toString(encrypt(ageOrExperienceToSave)));
340 | writeTXT.print("\t");
341 | writeTXT.println(Arrays.toString(encrypt(sportOrProfessionalCardToSave)));
342 | }
343 | //System.out.print("\nDatos actualizados.");
344 | fw.close();
345 |
346 | } catch (IOException ex) {
347 | System.out.println(ex.getMessage());
348 | }
349 | }
350 | }
351 |
352 | @Override
353 | public void createFile(String nameDoc) {
354 | FileWriter flwriter = null;
355 | try {
356 | flwriter = new FileWriter(nameDoc);
357 | String pathfile = new File("").getAbsolutePath() + "\\" + nameDoc;
358 | System.out.println("Archivo \'" + nameDoc + "\' creado satisfactoriamente en la ruta: \n" + pathfile);
359 | //BufferedWriter bfwriter = new BufferedWriter(flwriter);
360 | //bfwriter.close();
361 | } catch (IOException e) {
362 | System.out.print("Error, El archivo no Exite / No se puede leer el archivo");
363 | e.printStackTrace();
364 | } finally {
365 | if (flwriter != null) {
366 | try {//cierra el flujo principal
367 | flwriter.close();
368 | } catch (IOException e) {
369 | System.out.print("Error, El archivo no Exite / No se puede leer el archivo");
370 | e.printStackTrace();
371 | }
372 | }
373 | }
374 | }
375 |
376 | @Override
377 | public byte[] encrypt(String unencrypted) throws Exception {
378 | final byte[] bytes = unencrypted.getBytes("UTF-8");
379 | final Cipher aes = getCipher(true);
380 | final byte[] encrypted = aes.doFinal(bytes);
381 | return encrypted;
382 | }
383 |
384 | @Override
385 | public String decrypt(String encrypted) throws Exception {
386 | byte[] encrypt = asBytes(encrypted);
387 | final Cipher aes = getCipher(false);
388 | final byte[] bytes = aes.doFinal(encrypt);
389 | final String unencrypted = new String(bytes, "UTF-8");
390 | return unencrypted;
391 | }
392 |
393 | @Override
394 | public Cipher getCipher(boolean toEncrypt) throws Exception {
395 | final String keyphrase = "EsteProyectoMeHaEnseñadoMuchoPeroCasiNoHeDormido_áÁéÉíÍóÓúÚüÜñÑ1234567890!#%$&()=%_MI_HUEVO_DE_PASCUA!_";
396 | final MessageDigest digest = MessageDigest.getInstance("SHA");
397 | digest.update(keyphrase.getBytes("UTF-8"));
398 | final SecretKeySpec key = new SecretKeySpec(digest.digest(), 0, 16, "AES");
399 |
400 | final Cipher aes = Cipher.getInstance("AES/ECB/PKCS5Padding");
401 | if (toEncrypt) {
402 | aes.init(Cipher.ENCRYPT_MODE, key);
403 | } else {
404 | aes.init(Cipher.DECRYPT_MODE, key);
405 | }
406 |
407 | return aes;
408 | }
409 |
410 | @Override
411 | public byte[] asBytes(String convertString) {
412 | String temporalString;
413 |
414 | convertString = convertString.replace("[", "").replace("]", "").replaceAll(" ", "");
415 | String[] readUserArray = convertString.split(",");
416 |
417 | byte[] byteReadUser = new byte[readUserArray.length];
418 | for (int i = 0; i < readUserArray.length; i++) {
419 | temporalString = readUserArray[i];
420 | byteReadUser[i] = (byte) (Integer.parseInt(temporalString) & 0xff);
421 | }
422 | //System.out.println(Arrays.toString(byteReadUser));
423 | return byteReadUser;
424 | }
425 |
426 | public String createIdentifier() {
427 | String identifier;
428 | char[] identifierArray = new char[10];
429 | char[] characters = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
430 | 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n',
431 | 'ñ', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
432 | 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N',
433 | 'Ñ', 'O', 'P', 'Q', 'R', 'S', 'T', 'T', 'V', 'W', 'X', 'Y', 'Z'};
434 |
435 | for (int i = 0; i < identifierArray.length; i++) {
436 | int arrayElement = (int) (Math.random() * characters.length);
437 | identifierArray[i] = (char) characters[arrayElement];
438 | }
439 |
440 | return identifier = new String(identifierArray);
441 | }
442 |
443 | /* ----------- SETTERS & GETTERS ------------------------------------------*/
444 | public String getId() {
445 | return id;
446 | }
447 |
448 | public void setId(String id) {
449 | this.id = id;
450 | }
451 |
452 | public String getUser() {
453 | return user;
454 | }
455 |
456 | public void setUser(String user) {
457 | this.user = user;
458 | }
459 |
460 | public String getPassword() {
461 | return password;
462 | }
463 |
464 | public void setPassword(String password) {
465 | this.password = password;
466 | }
467 |
468 | public String getName() {
469 | return name;
470 | }
471 |
472 | public void setName(String name) {
473 | this.name = name;
474 | }
475 |
476 | public String getLastName() {
477 | return lastName;
478 | }
479 |
480 | public void setLastName(String lastName) {
481 | this.lastName = lastName;
482 | }
483 |
484 | public String getBirthdate() {
485 | return birthdate;
486 | }
487 |
488 | public void setBirthdate(String birthdate) {
489 | this.birthdate = birthdate;
490 | }
491 |
492 | public String getPhone() {
493 | return phone;
494 | }
495 |
496 | public void setPhone(String phone) {
497 | this.phone = phone;
498 | }
499 |
500 | public String getEmail() {
501 | return email;
502 | }
503 |
504 | public void setEmail(String email) {
505 | this.email = email;
506 | }
507 |
508 | public String getUserType() {
509 |
510 | return userType;
511 | }
512 |
513 | public void setUserType(String userType) {
514 | this.userType = userType;
515 | }
516 |
517 | public String getSex() {
518 | return sex;
519 | }
520 |
521 | public void setSex(String sex) {
522 | this.sex = sex;
523 | }
524 |
525 | public HashMap getListOfPatientData() throws Exception {
526 | readDatabase();
527 | return listOfPatientData;
528 | }
529 |
530 | public void setListOfPatientData(HashMap listOfPatientData) {
531 | this.listOfPatientData = listOfPatientData;
532 | }
533 |
534 | public HashMap getListOfNutritionistsData() throws Exception {
535 | readDatabase();
536 | return listOfNutritionistsData;
537 | }
538 |
539 | public void setListOfNutritionistsData(HashMap listOfNutritionistsData) {
540 | this.listOfNutritionistsData = listOfNutritionistsData;
541 | }
542 |
543 | @Override
544 | public String toString() {
545 | String toString;
546 | if ("1".equals(userType)) {
547 | toString = "PACIENTE{" + " Usuario: " + user + " Identificación: " + id
548 | + " Nombre: " + name + " Apellidos: " + lastName + " Sexo: " + sex
549 | + " Fecha de nacimiento: " + birthdate + " Teléfono: " + phone
550 | + " Email: " + email + '}';
551 | } else {
552 | toString = "NUTRICIONISTA{" + " Usuario: " + user + " Identificación: " + id
553 | + " Nombre: " + name + " Apellidos: " + lastName + " Sexo: " + sex
554 | + " Fecha de nacimiento: " + birthdate + " Teléfono: " + phone
555 | + " Email: " + email + '}';
556 | }
557 | return toString;
558 | }
559 |
560 |
561 | @Override
562 | public void saveData(String user, String password, String id) throws Exception {
563 | throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
564 | }
565 |
566 | @Override
567 | public void createReport() {
568 | throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
569 | }
570 |
571 | }
572 |
--------------------------------------------------------------------------------