-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathScroll.java
More file actions
executable file
·48 lines (41 loc) · 997 Bytes
/
Copy pathScroll.java
File metadata and controls
executable file
·48 lines (41 loc) · 997 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
/**
* Write a description of class Scroll here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class Scroll
{
private String paper;
private String ink;
private String title;
/**
* Constructor for objects of class Scroll
*/
public Scroll(String paper, String ink, String title){
this.paper = paper;
this.ink = ink;
this.title = title;
}
public String getPaper(){
return paper;
}
public String getInk(){
return ink;
}
public String getTitle(){
return title;
}
public String getDescription(){
return "a " + paper + " scroll, in " + ink + " ink, titled " + title;
}
public boolean equals(Scroll s){
if(s.getPaper().equals(paper)
&& s.getInk().equals(ink)
&& s.getTitle().equals(title)){
return true;
} else {
return false;
}
}
}