public Aluno pegaAlunoDoFormulario() {

    aluno.setNome(nome.getEditableText().toString());
    aluno.setEndereco(endereco.getEditableText().toString());
    aluno.setTelefone(telefone.getEditableText().toString());
    aluno.setSite(site.getEditableText().toString());
    aluno.setNota(Double.valueOf(nota.getProgress()));

    return aluno;
  }
示例#2
0
  public static void main(String args[]) {
    Pessoa pes = new Pessoa("Karen", new Data(2, 4, 1973), "0123");

    Aluno al = new Aluno("Vanessa", new Data(18, 6, 1980), "0759", "99118754");
    al.setEndereco(new Endereco("Rua da Margaridas", 793, "92000-230", "RS"));

    Professor prof = new Professor("Mauro", new Data(4, 2, 1971), "9376", "P33", "8776-00");
    prof.setEndereco(new Endereco("Rua da Orquideas", 23, "apto 301", "90340-210", "RS"));
    prof.setTelefone("0xx51 3356-6676");

    System.out.println("Ficha da Pessoa Karen");
    System.out.println(pes.toString());

    System.out.println("Ficha da Aluna Vanessa");
    System.out.println(al.toString());

    System.out.println("Ficha do Professor Mauro");
    System.out.println(prof.toString());
  }