-
Notifications
You must be signed in to change notification settings - Fork 0
/
Movie.java
57 lines (56 loc) · 1.14 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
/**
* Write a description of class Movie here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class Movie
{
// instance variables - replace the example below with your own
private int rating;
private String title;
private String year;
private double price;
public static int duration;
/**
* Constructor for objects of class Movie
*/
public Movie()
{
// initialise instance variables
rating = 0;
title = "";
year = "";
price = 0.0;
}
public String getTitle() {
return title;
}
public void setTitle(String t) {
title = t;
}
public void setRating(int r) {
rating = r;
}
public int getRating() {
return rating;
}
public String getYear() {
return year;
}
public void setYear(String y) {
year = y;
}
public void setPrice(double p) {
price = p;
}
public double getPrice() {
return price;
}
public void setDuration(int d) {
duration = d;
}
public int getDuration() {
return duration;
}
}