diff --git a/Aluno.java b/Aluno.java index cd1681b..0a1908f 100644 --- a/Aluno.java +++ b/Aluno.java @@ -6,7 +6,7 @@ public class Aluno { private int ano; private boolean bolsista; - public Aluno(int nome, int idade, String localNascimento, String curso, String matricula, int semestre, int ano, boolean bolsista){ + public Aluno(String nome, int idade, String localNascimento, String curso, String matricula, int semestre, int ano, boolean bolsista){ this.pessoa = new Pessoa(nome, idade, localNascimento); this.curso = curso; this.matricula = matricula; @@ -15,7 +15,7 @@ public class Aluno { this.bolsista = bolsista; } - public int getNome(){ + public String getNome(){ return this.pessoa.getNome(); } diff --git a/Bolsista.java b/Bolsista.java index c3bc617..26f5048 100644 --- a/Bolsista.java +++ b/Bolsista.java @@ -3,13 +3,13 @@ public class Bolsista{ private String projeto; private String orientador; - public Bolsista(int nome, int idade, String localNascimento, String curso, String matricula, int semestre, int ano, boolean bolsista, String projeto, String orientador){ + public Bolsista(String nome, int idade, String localNascimento, String curso, String matricula, int semestre, int ano, boolean bolsista, String projeto, String orientador){ this.aluno = new Aluno(nome, idade, localNascimento, curso, matricula, semestre, ano, bolsista); this.projeto = projeto; this.orientador = orientador; } - public int getNome(){ + public String getNome(){ return this.aluno.getNome(); } diff --git a/Pessoa.java b/Pessoa.java index b341dc6..ba2a97e 100644 --- a/Pessoa.java +++ b/Pessoa.java @@ -1,15 +1,15 @@ public class Pessoa{ - private int nome; + private String nome; private int idade; private String localNascimento; - public Pessoa(int nome, int idade, String localNascimento){ + public Pessoa(String nome, int idade, String localNascimento){ this.nome = nome; this.idade = idade; this.localNascimento = localNascimento; } - public int getNome(){ + public String getNome(){ return this.nome; }