-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMovie.java
91 lines (73 loc) · 1.36 KB
/
Movie.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
public class Movie{
//private instances
private String title;
private int date;
private int id;
private int rating;
private boolean isAvailable;
private Movie left;
private Movie right;
private Movie next;
//constructor method
public Movie(String name, int date0, int id0, int rating0, boolean isAvailable0){
title = name;
date = date0;
id = id0;
rating = rating0;
isAvailable = isAvailable0;
}
//get the movie's name
public String getTitle(){
return title;
}
public void setTitle(String title0){
title = title0;
}
//get the movie's release date
public int getDate(){
return date;
}
public void setDate(int date0){
date = date0;
}
//get the movie's id
public int GetID(){
return id;
}
public void setID(int id0){
id = id0;
}
//get key
public int getIDKey(){
return id%10000;
}
//get the movie's rating
public int getRating(){
return rating;
}
public void setRating(int rating0){
rating = rating0;
}
//see if whether or not we hold the movie
public boolean isAvailable(){
return isAvailable;
}
public Movie getLeft(){
return left;
}
public Movie getRight(){
return right;
}
public void setRight(Movie right0){
right = right0;
}
public void setLeft(Movie left0){
left = left0;
}
public Movie getNext(){
return next;
}
public void setNext(Movie next0){
next = next0;
}
}