-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBasketBallGame.java
More file actions
26 lines (18 loc) · 1.09 KB
/
BasketBallGame.java
File metadata and controls
26 lines (18 loc) · 1.09 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
package project3;
import java.lang.String;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.Date;
import project3.SportEvent;
public final class BasketBallGame extends SportEvent {
private static ArrayList<Event> eventList = new ArrayList<Event>();
public BasketBallGame(String name, String place, Date dateTime, int audience, int cost, int revenue, int profit, String[] players, int[] scores, String league) throws ParseException {
super(name, place, dateTime, audience, cost, revenue, profit, players, scores, league);
BasketBallGame event = this;
BasketBallGame.eventList.add(event);
} // BasketBallGame()
public static ArrayList getEventList() {return BasketBallGame.eventList;} // static method, cannot be over-ridden
public static int getNumberOfObjects() {return BasketBallGame.getEventList().size();} // static method, cannot be over-ridden
@Override // project2.SportEvent.toString()
public String toString() {return super.toString();}
} // class BaseketBallGame