-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPostDW.java
More file actions
38 lines (32 loc) · 967 Bytes
/
PostDW.java
File metadata and controls
38 lines (32 loc) · 967 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
/**
* Each instance of this class represents a different reddit post, and includes
* accessor methods to retrieve the post's title, url, and body text.
*
* @author DataWrangler
*/
public class PostDW implements PostInterface {
private String title;
private String url;
private String body;
/**
* Instantiation of new post objects requires the following data:
*
* @param title describing the post's content
* @param url of publicly accessible redit post containing this title and body
* @param body of text ellaborating on the topic of title
*/
public PostDW(String title, String url, String body) {
this.title = title;
this.url = url;
this.body = body;
}
public String getTitle() { // post's accessor method for title
return title;
}
public String getUrl() { // post's accessor method for url
return url;
}
public String getBody() { // post's accessor method for body
return body;
}
}