-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNewspapers.java
More file actions
37 lines (29 loc) · 1.04 KB
/
Copy pathNewspapers.java
File metadata and controls
37 lines (29 loc) · 1.04 KB
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
import java.util.Calendar;
public class Newspapers extends Collections {
protected String ISSN;
//set default and set type to newspaper
public Newspapers() {
super();
this.type = "Newspaper";
this.ISSN = "0000000";
}
public Newspapers(String collectionID, String title, String ISSN) {
this();
this.collectionID = collectionID;
this.title = title;
this.ISSN = ISSN;
}
public Newspapers(String collectionID, String title, String publisher, String genre, String type,
String ISSN) {
super(collectionID, title, publisher, genre, type);
this.type = "Newspaper";
this.ISSN = ISSN;
}
public String getISSN() {
return this.ISSN;
}
//make into string to be used with SaveToFile.java
public String toString() {
return String.format("%s,%s,%s,%s,%s,%s\n", this.getCollectionID(), this.getISSN(), this.getTitle(), this.getPublisher(), this.getGenre(), this.getType());
}
}