-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathRavensObject.java
executable file
·56 lines (52 loc) · 1.6 KB
/
RavensObject.java
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
53
54
55
56
/*
* DO NOT MODIFY THIS FILE.
*
* Any modifications to this file will not be used when grading your project.
* If you have any questions, please email the TAs.
*
*/
package project2;
import java.util.ArrayList;
/**
* A single object in a RavensFigure -- typically, a single shape in a frame,
* such as a triangle or a circle -- comprised of a list of RavensAttributes.
*
*/
public class RavensObject {
private String name;
private ArrayList<RavensAttribute> attributes;
/**
* Constructs a new RavensObject given a name.
*
* Your agent does not need to use this method.
*
* @param name the name of the object
*/
public RavensObject(String name) {
this.name=name;
attributes=new ArrayList<>();
}
/**
* The name of this RavensObject. Names are assigned starting with the
* letter Z and proceeding backwards in the alphabet through the objects
* in the Frame. Names do not imply correspondence between shapes in
* different frames. Names are simply provided to allow agents to organize
* their reasoning over different figures.
*
* Within a RavensFigure, each RavensObject has a unique name.
*
* @return the name of the RavensObject
*/
public String getName() {
return name;
}
/**
* Returns an ArrayList of RavensAttribute characterizing this RavensObject.
*
* @return an ArrayList of RavensAttribute
*
*/
public ArrayList<RavensAttribute> getAttributes() {
return attributes;
}
}