primer commit de modelo
This commit is contained in:
@@ -0,0 +1,69 @@
|
|||||||
|
/*
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
||||||
|
*/
|
||||||
|
package Modelo;
|
||||||
|
|
||||||
|
|
||||||
|
public class Persona {
|
||||||
|
|
||||||
|
private String nombre;
|
||||||
|
private double altura;
|
||||||
|
private double peso;
|
||||||
|
private double imc;
|
||||||
|
|
||||||
|
public Persona(String nombre, double altura, double peso, double imc) {
|
||||||
|
this.nombre = nombre;
|
||||||
|
this.altura = altura;
|
||||||
|
this.peso = peso;
|
||||||
|
this.imc = imc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNombre() {
|
||||||
|
return nombre;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNombre(String nombre) {
|
||||||
|
this.nombre = nombre;
|
||||||
|
}
|
||||||
|
|
||||||
|
public double getAltura() {
|
||||||
|
return altura;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAltura(double altura) {
|
||||||
|
this.altura = altura;
|
||||||
|
}
|
||||||
|
|
||||||
|
public double getPeso() {
|
||||||
|
return peso;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPeso(double peso) {
|
||||||
|
this.peso = peso;
|
||||||
|
}
|
||||||
|
|
||||||
|
public double getImc() {
|
||||||
|
return imc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setImc(double imc) {
|
||||||
|
this.imc = imc;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "Persona{" + "nombre=" + nombre + ", altura=" + altura + ", peso=" + peso + ", imc=" + imc + '}';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
+13
-2
@@ -2,7 +2,8 @@
|
|||||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.mycompany.parcial.imc.base;
|
package Presentacion;
|
||||||
|
import Modelo.Persona;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@@ -11,6 +12,16 @@ package com.mycompany.parcial.imc.base;
|
|||||||
public class Parcialimc {
|
public class Parcialimc {
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
System.out.println("Hello World!");
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user