-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEvent.java
More file actions
38 lines (31 loc) · 907 Bytes
/
Event.java
File metadata and controls
38 lines (31 loc) · 907 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
package eventregsystem;
public class Event {
private int eventId;
private String eventName;
private String eventDate; // in "yyyy-MM-dd" format
private String description;
// Constructor with all fields
public Event(int eventId, String eventName, String eventDate, String description) {
this.eventId = eventId;
this.eventName = eventName;
this.eventDate = eventDate;
this.description = description;
}
// Getters
public int getEventId() {
return eventId;
}
public String getEventName() {
return eventName;
}
public String getEventDate() {
return eventDate;
}
public String getDescription() {
return description;
}
@Override
public String toString() {
return eventName + " (" + eventDate + ") - " + description;
}
}