-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEvent.java
More file actions
68 lines (53 loc) · 1.52 KB
/
Event.java
File metadata and controls
68 lines (53 loc) · 1.52 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
public class Event implements Comparable<Event> {
private String EventTitle, Location, ContactName;
private String DataAndTime;
private Contact Contact_inv;
public Event(String eventTitle, String dateAndTime, String location, Contact Contact_inv) {
this.EventTitle = eventTitle;
this.DataAndTime = dateAndTime;
this.Location = location;
this.Contact_inv = Contact_inv;
ContactName = Contact_inv.getContactName();
}
public String getEventTitle() {
return EventTitle;
}
public void setEventTitle(String eventTitle) {
EventTitle = eventTitle;
}
public String getDataAndTime() {
return DataAndTime;
}
public void setDataAndTime(String dataAndTime) {
DataAndTime = dataAndTime;
}
public String getLocation() {
return Location;
}
public void setLocation(String location) {
Location = location;
}
public String getContactName() {
return ContactName;
}
public void setContactName(String contactName) {
ContactName = contactName;
}
public Contact getContact_inv() {
return Contact_inv;
}
public void setContact_inv(Contact Contact_inv) {
this.Contact_inv = Contact_inv;
}
@Override
public int compareTo(Event other) {
return this.EventTitle.compareTo(other.getEventTitle());
}
public String toString() {
String str = "\nEvent title: " + EventTitle +
"\nContacts names: " +ContactName+
"\nEvent date and time (MM/DD/YYYY HH:MM): " + DataAndTime +
"\nEvent location: " + Location + "\n" ;
return str;
}
}