-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAluno.java
More file actions
50 lines (39 loc) · 981 Bytes
/
Aluno.java
File metadata and controls
50 lines (39 loc) · 981 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
public class Aluno {
private int matricula;
private String nome;
private double nota;//8 bytes
private Aluno proximo;
private Aluno anterior;
//construtor
public Aluno(int matricula, String nome, double nota) {
this.matricula = matricula;
this.nome = nome;
this.nota = nota;
}
//construtor
public Aluno() {
nota=3.2;
}
public int getMatricula() {
return matricula;
}
public void setMatricula(int matricula) {
this.matricula = matricula;
}
public String getNome() {
return nome;
}
public void setNome(String nome) {
this.nome = nome;
}
public double getNota() {
return nota;
}
public void setNota(double nota) {
this.nota = nota;
}
@Override
public String toString() {
return String.format("Nome: %s, matricula: %d e nota: %.1f", nome,matricula,nota);
}
}