-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDVD.java
More file actions
39 lines (36 loc) · 839 Bytes
/
Copy pathDVD.java
File metadata and controls
39 lines (36 loc) · 839 Bytes
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
/**
* DVD class
*
* @author jusps
* @version 1
*/
class DVD extends Product {
private boolean isBluRay;
/**
* constructor
*
* @param String name
* @param String description
* @param boolean bluRay
*/
public DVD(String name, String description, boolean bluRay) {
super(name, description);
isBluRay = bluRay;
}
/**
* getter that returns whether the DVD is bluRay or not
*
* @return boolean isBluRay
*/
public boolean isBluRay() {
return isBluRay;
}
/**
* Follows the 239th Rule of Acquisition: never be afraid to mislabel a product
* changes isBluRay to its opposite, so if it is true, then it become false. if it is false, it becomes true
*
*/
public void the239thRuleOfAcquisition() {
isBluRay = !isBluRay;
}
}