-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMagazine.java
More file actions
executable file
·53 lines (45 loc) · 1.15 KB
/
Magazine.java
File metadata and controls
executable file
·53 lines (45 loc) · 1.15 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
/* Librarian Assistant Pro - Version 1.7
* Class: Magazine
* Duties:
* The instance of this class represents a magazine
* magazine class extends title class; meaning that
* magazine IS-A title. Therefore it inherites all the
* properties of titles class.
* Magazine is an issue of a specific magazine and the
* instance of this class keeps the information of a
* magazine.
* Creation Date: November 2008
*/
import java.util.Date;
class Magazine extends Title
{
private Title magazineTitle;
private String trackingCode;
private Date arrivalDate;
public Magazine(Title myTitle, String myTrackingCode, Date myArrivalDate)
{
magazineTitle = myTitle;
trackingCode = myTrackingCode;
arrivalDate = myArrivalDate;
}
public String getTitle()
{
return magazineTitle.getTitle();
}
public String getTrackingCode()
{
return trackingCode;
}
public Date getArrivalDate()
{
return arrivalDate;
}
public void setArrivalDate(Date newDate)
{
arrivalDate = newDate;
}
public String toString()
{
return magazineTitle.getTitle() + "|" + trackingCode + "|" + arrivalDate;
}
}