- Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMagazine.java
More file actions
Latest commit
executable file
·53 lines (45 loc) · 1.15 KB
/
Copy pathMagazine.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
*/
importjava.util.Date;
classMagazineextendsTitle
{
privateTitlemagazineTitle;
privateStringtrackingCode;
privateDatearrivalDate;
publicMagazine(TitlemyTitle, StringmyTrackingCode, DatemyArrivalDate)
{
magazineTitle = myTitle;
trackingCode = myTrackingCode;
arrivalDate = myArrivalDate;
}
publicStringgetTitle()
{
returnmagazineTitle.getTitle();
}
publicStringgetTrackingCode()
{
returntrackingCode;
}
publicDategetArrivalDate()
{
returnarrivalDate;
}
publicvoidsetArrivalDate(DatenewDate)
{
arrivalDate = newDate;
}
publicStringtoString()
{
returnmagazineTitle.getTitle() + "|" + trackingCode + "|" + arrivalDate;
}
}