-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOperaDArte.java
More file actions
52 lines (37 loc) · 936 Bytes
/
OperaDArte.java
File metadata and controls
52 lines (37 loc) · 936 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
49
50
51
52
package prg.testEsame.es1;
public class OperaDArte{
private String title;
private String author;
private String date;
//costruttori
public OperaDArte(String title, String author, String date){
this.setTitle(title).setAuthor(author).setDate(date);
}
//metodi set
public OperaDArte setTitle(String title){
this.title = title;
return this;
}
public OperaDArte setAuthor(String author){
this.author = author;
return this;
}
public OperaDArte setDate(String date){
this.date = date;
return this;
}
//metodi get
public String getTitle(){
return this.title;
}
public String getAuthor(){
return this.author;
}
public String getDate(){
return this.date;
}
//metodo toString
public String toString(){
return "TITOLO OPERA: " + this.getTitle() + "AUTORE: " + this.getAuthor() + "DATA REALIZZAZIONE: " + this.getDate();
}
}