-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathArtEvent.java
More file actions
32 lines (22 loc) · 1.19 KB
/
ArtEvent.java
File metadata and controls
32 lines (22 loc) · 1.19 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
package project3;
import java.lang.String;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.Date;
import project3.Event;
public final class ArtEvent extends Event {
private String type;
private static ArrayList<Event> eventList = new ArrayList<Event>();
protected ArtEvent(String name, String place, Date dateTime, int audience, int cost, int revenue, int profit, String type) throws ParseException {
super(name, place, dateTime, audience, cost, revenue, profit);
this.setType(type);
ArtEvent event = this;
ArtEvent.eventList.add(event);
} // MusicEvent()
public final void setType(String type) {this.type = type;}
public String getType() {return this.type;}
public static ArrayList getEventList() {return ArtEvent.eventList;} // static method, cannot be over-ridden
public static int getNumberOfObjects() {return ArtEvent.getEventList().size();} // static method, cannot be over-ridden
@Override // project2.Event.toString()
public String toString() {return super.toString() + " [type = " + this.getType() + "]";}
} // class ArtEvent