-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEvent.java
More file actions
74 lines (56 loc) · 1.89 KB
/
Copy pathEvent.java
File metadata and controls
74 lines (56 loc) · 1.89 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
69
70
71
72
73
74
public class Event{
private String eventName;
private String eventDescription;
private String eventLocation;
private int noOfTickets;
private Date eventDate;
private Time eventTime;
private double ticketPrice;
private String eventID;
private boolean plus18;
public void setEventName(String eventName){
this.eventName = eventName;
}
public void setEventDescription(String eventDescription){
this.eventDescription = eventDescription;
}
public void setEventLocation(String eventLocation){
this.eventLocation = eventLocation;
}
public void setNoOfTickets(int noOfTickets){
this.noOfTickets = noOfTickets;
}
public void setEventDate(Date eventDate){
this.eventDate = eventDate;
}
public void setEventTime(Time eventTime){
this.eventTime = eventTime;
}
public void setTicketPrice(double ticketPrice){
this.ticketPrice = ticketPrice;
}
public void setEventID(String eventID){
this.eventID = eventID;
}
public void setParentalGuide(boolean plus18){
this.plus18 = plus18;
}
public String getEventID(){
return eventID;
}
public String getEventName(){
return eventName;
}
public Date getEventDate(){
return eventDate;
}
public String getHostEventSummary(){
return String.format("Event name: %s%nEvent ID: %s%n Event Description: %s%nDate of Event: %s%nTime of Event: %s%nPrice of Ticket: %.2f%nLocation of Event: %s%nBooked Number of Ticket: %d%nAge 18+: %d%n", eventName, eventID, eventDescription, eventDate, eventTime, eventLocation, noOfTickets, plus18);
}
public String getAttendeeEventSummary(){
return String.format("Event Name: %s%nEvent ID: %s%nDate of Event: %s%nTime of Event: %s%n Location: %s%nTicket Price: %.2f%nEvent Description: %s%n", eventName, eventDate, eventTime, eventLocation, ticketPrice, eventDescription);
}
public String eventSummaryForSearch(){
return String.format("%-12s%-50s%-15s%n", eventID, eventName, eventDate);
}
}