Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Exercicio3
- {
- public class Pessoa
- {
- private string nome;
- private string data_nascimento;
- private float altura;
- private float peso;
- public string nome_p
- {
- get
- {
- return nome;
- }
- set
- {
- nome = value;
- }
- }
- public string data_nascimento_p
- {
- get
- {
- return data_nascimento;
- }
- set
- {
- data_nascimento = value;
- }
- }
- public float altura_p
- {
- get
- {
- return altura;
- }
- set
- {
- altura = value;
- }
- }
- public float peso_p
- {
- get
- {
- return peso;
- }
- set
- {
- peso = value;
- }
- }
- public double IMC()
- {
- double imc = Math.Round(peso / (altura * altura), 2);
- return imc;
- }
- ~Pessoa()
- {
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment