-
Notifications
You must be signed in to change notification settings - Fork 38
Expand file tree
/
Copy pathSnake.java
More file actions
52 lines (46 loc) · 1008 Bytes
/
Snake.java
File metadata and controls
52 lines (46 loc) · 1008 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 model;
/**
* @author nmich - nmichaud
* CIS175 - Spring 2023
* Jan 16, 2023
*/
public class Snake {
private String name;
private int length;
private boolean isVenomous;
public Snake() {
super();
// TODO Auto-generated constructor stub
}
public Snake(String name, int length, boolean isVenomous) {
super();
this.name = name;
this.length = length;
this.isVenomous = isVenomous;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getLength() {
return length;
}
public void setLength(int length) {
this.length = length;
}
public boolean isVenomous() {
return isVenomous;
}
public void setVenomous(boolean isVenomous) {
this.isVenomous = isVenomous;
}
@Override
public String toString() {
return "Snake [name=" + name + ", length=" + length + ", isVenomous=" + isVenomous + "]";
}
public static String makeNoise() {
return "ssssssssssssssss";
}
}