-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFilm.java
More file actions
79 lines (62 loc) · 1.79 KB
/
Copy pathFilm.java
File metadata and controls
79 lines (62 loc) · 1.79 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
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
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author thien
*/
public class Film {
private String nameFilm;
private int yearMake;
private BrandFilm brandName;
private double ticketPrice;
private PublishDay publishDay;
public Film(String nameFilm, int yearMake, BrandFilm brandName, double ticketPrice, PublishDay publishDay) {
this.nameFilm = nameFilm;
this.yearMake = yearMake;
this.brandName = brandName;
this.ticketPrice = ticketPrice;
this.publishDay = publishDay;
}
public String getNameFilm() {
return nameFilm;
}
public void setNameFilm(String nameFilm) {
this.nameFilm = nameFilm;
}
public int getYearMake() {
return yearMake;
}
public void setYearMake(int yearMake) {
this.yearMake = yearMake;
}
public BrandFilm getBrandName() {
return brandName;
}
public void setBrandName(BrandFilm brandName) {
this.brandName = brandName;
}
public double getTicketPrice() {
return ticketPrice;
}
public void setTicketPrice(double ticketPrice) {
this.ticketPrice = ticketPrice;
}
public PublishDay getPublishDay() {
return publishDay;
}
public void setPublishDay(PublishDay publishDay) {
this.publishDay = publishDay;
}
public Boolean checkTicketPriceCheaper(Film phimKhac) {
return this.ticketPrice < phimKhac.ticketPrice;
}
public String printBrandName() {
return this.brandName.getNameBrand();
}
public double discount(double x) {
return this.ticketPrice - this.ticketPrice * (x / 100);
}
}