-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMovie.java
61 lines (56 loc) · 1.27 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
/**
* Write a description of Movie here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class Movie {
public int yr,mins;
public String Id,ttl,gnr,dir,cnty,pstr;
// Constructor for initializing the 8 private variable.
public Movie(String id,String title,int year,String genres,String director,String country,int minutes,String poster)
{
Id=id;
ttl=title;
yr=year;
gnr=genres;
dir=director;
cnty=country;
mins=minutes;
pstr=poster;
}
//8 getter methods which returns the details about a movie.
public String getID()
{
return(Id);
}
public String getTitle()
{
return(ttl);
}
public int getYear()
{
return(yr);
}
public String getGenre()
{
return(gnr);
}
public String getCountry()
{
return(cnty);
}
public int getMinutes()
{
return(mins);
}
public String getPoster()
{
return(pstr);
}
public String toString()
{
//represents movie information to be printed.
return("id:"+Id +" Title: "+ttl + " year:" +yr+ " genres:"+gnr+" country:"+cnty+" minutes:"+mins+" poster:"+pstr);
}
}