-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathTitle.java
executable file
·144 lines (123 loc) · 3.18 KB
/
Title.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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
/* Librarian Assistant Pro - Version 1.7
* Class: Title
* Duties:
* The instance of this class represents a specefic title
* and Keeps the information of a title
* Creation Date: September 2008
*/
import java.util.Date;
class Title
{
//************************* Filds *************************
private String title;
private Date expiryDate;
private double sbcCost;
private Date firstArrivalDate;
private int period;
public String type;
public String publisher;
public String country;
public String sourceType;
public String vendor;
public String vendorPhone;
public String vendorAddress;
public String issuedTo;
public String costCenter;
public String budgetCat;
//********************* Constructors **********************
//Immidiate creation type
public Title(String myTitle, Date myExpiryDate, double mySbcCost, Date myFirstArrivalDate, int myPeriod)
{
title = myTitle;
expiryDate = myExpiryDate;
sbcCost = mySbcCost;
firstArrivalDate = myFirstArrivalDate;
period = myPeriod;
}
//Non-Argument constructor
public Title()
{
title = "";
expiryDate = null;
sbcCost = 0.0;
firstArrivalDate = null;
period = 0;
}
//Complete creation type
public Title(String myTitle, Date myExpiryDate, double mySbcCost, Date myFirstArrivalDate, int myPeriod,
String myType, String myPublisher, String myCountry, String mySourceType, String myVendor,
String myVendorPhone, String myVendorAddress, String myIssuedTo, String myCostCenter,
String myBudgetCat)
{
title = myTitle;
expiryDate = myExpiryDate;
sbcCost = mySbcCost;
firstArrivalDate = myFirstArrivalDate;
period = myPeriod;
type = myType;
publisher = myPublisher;
country = myCountry;
sourceType = mySourceType;
vendor = myVendor;
vendorPhone = myVendorPhone;
vendorAddress = myVendorAddress;
issuedTo = myIssuedTo;
costCenter = myCostCenter;
budgetCat = myBudgetCat;
}
//************************ Methods ************************
public String getTitle()
{
return title;
}
public Date getExpiryDate()
{
return expiryDate;
}
public double getSbcCost()
{
return sbcCost;
}
public Date getFirstArrivalDate()
{
return firstArrivalDate;
}
public int getPeriod()
{
return period;
}
public void setTitle(String newTitle)
{
title = newTitle;
}
public void setExpiryDate(Date newExpiryDate)
{
expiryDate = newExpiryDate;
}
public void setSbcCost(double newSbcCost)
{
sbcCost = newSbcCost;
}
public void setFirstArrivalDate(Date newFirstArrivalDate)
{
firstArrivalDate = newFirstArrivalDate;
}
public void setPeriod(int newPeriod)
{
period = newPeriod;
}
public boolean equals(Title other)
{
if(this.title.equals(other.title))
return true;
else
return false;
}
public String toString()
{
return title + "|" + expiryDate + "|" + sbcCost + "|" + firstArrivalDate + "|" +
period + "|" + type + "|" + publisher + "|" + country + "|" + sourceType + "|" +
vendor + "|" + vendorPhone + "|" + vendorAddress + "|" + issuedTo + "|" +
costCenter + "|" + budgetCat;
}
}