-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAnimal.java
More file actions
52 lines (48 loc) · 921 Bytes
/
Animal.java
File metadata and controls
52 lines (48 loc) · 921 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
51
52
package Lucas;
public abstract class Animal
{
private String nome;
private int idade;
private String som;
private String movimento;
public Animal (String nome,int idade,String som,String movimento)
{
super ();
this.nome = nome;
this.idade = idade;
this.som = som;
this.movimento = movimento;
}
public String getNome() {
return nome;
}
public void setNome(String nome) {
this.nome = nome;
}
public int getIdade() {
return idade;
}
public void setIdade(int idade) {
this.idade = idade;
}
public String getSom() {
return som;
}
public void setSom(String som) {
this.som = som;
}
public String getMovimento() {
return movimento;
}
public void setMovimento(String movimento) {
this.movimento = movimento;
}
public void movimento()
{
System.out.println("O movimento deste animal é...");
}
public void som()
{
System.out.println("O som deste animal é...");
}
}