-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathClub.java
96 lines (79 loc) · 2.43 KB
/
Club.java
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
/*
* **********************************************
* San Francisco State University
* CSC 220 - Data Structures
* File Name: Club.java
* @author: Duc Ta
* @author: Bryan Khor
* **********************************************
*/
package CSC220ASMT2;
public final class Club extends Organization{
//
// Instance Data Fields
//
private String name;
//
// Constructors
//
public Club() {
}
public Club(String defaultClub) {
this.name = defaultClub;
}
//
// Instance Methods
//
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
// Static Method
public static String getOfficialSong() {
return "Take Me out to the Ball Game";
}
//
// Additional Methods
//
@Override
public void displayAbout() {
System.out.println("Club: San Francisco Giants");
System.out.println("Short name: SF Giants");
System.out.println("Established in: 1883");
System.out.println("Colors: Orange, Black, Gold, Cream");
System.out.println("Ballpark: Oracle Park");
System.out.println("World Series Title: 8");
System.out.println("NL Pennants: 23");
System.out.println("Division Titles: 8");
System.out.println("Wild Card Berths: 3");
System.out.println("Owners: San Francisco Baseball Associates LLC");
System.out.println("President: " + getPresidentName());
System.out.println("General Manager: " + getGeneralManagerName());
System.out.println("Manager: " + getManagerName());
}
@Override
public void displayMission() {
}
// Object
FrontOffice frontOffice = new FrontOffice();
//
// Additional Instance Methods
//
public String getManagerName() {
frontOffice.setManagerName("Gabe", "Kapler");
return frontOffice.getManagerName();
}
public String getGeneralManagerName() {
frontOffice.setGeneralManagerName("Scott", "Harris");
return frontOffice.getGeneralManagerName();
}
public String getPresidentName() {
frontOffice.setPresidentName("Farhan", "Zaidi");
return frontOffice.getPresidentName();
}
//
// Language
//
}