-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSciTechLiterature.java
More file actions
36 lines (27 loc) · 1.07 KB
/
Copy pathSciTechLiterature.java
File metadata and controls
36 lines (27 loc) · 1.07 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
package Java4;
public class SciTechLiterature extends Java4.Literature {
private String fieldScience;
private int numberInstances;
public SciTechLiterature(int code, String type, String name, int year, String namePublic, int numberPages, String writer, String fieldScience, int numberInstances) {
super(code, type, name, year, namePublic, numberPages, writer);
this.fieldScience = fieldScience;
this.numberInstances = numberInstances;
}
public String getFieldScience() {
return fieldScience;
}
public void setFieldScience(String fieldScience) {
this.fieldScience = fieldScience;
}
public Integer getNumberInstances() {
return numberInstances;
}
public void setNumberInstances(Integer numberInstances) {
this.numberInstances = numberInstances;
}
public String toString() {
return "\n" + super.toString() +
"\nField of science: " + getFieldScience() +
"\nNumber of instances: " + getNumberInstances();
}
}