-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMovie.java
44 lines (34 loc) · 802 Bytes
/
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
public class Movie {
private String name;
private String actor;
private String director;
private int year_of_release;
public enum MovieAttribute {
name, actor, director, year
}
public Movie(String name, String actor, String director, int yearOfRelease) {
this.name = name;
this.actor = actor;
this.director = director;
year_of_release = yearOfRelease;
}
// getter
public String getMovieName() {
return name;
}
public String getActorName() {
return actor;
}
public String getDirectorName() {
return director;
}
public int getYearOfRelease() {
return year_of_release;
}
public void DisplayMovie() {
System.out.print(name + " | \t");
System.out.print(actor + " | \t");
System.out.print(director + " | \t");
System.out.println(director + " | \t");
}
}