-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCD.java
More file actions
38 lines (35 loc) · 772 Bytes
/
Copy pathCD.java
File metadata and controls
38 lines (35 loc) · 772 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
/**
* CD class
*
* @author jusps
* @version 1
*/
public class CD extends Product {
private boolean isRom;
/**
* constructor
*
* @param String name
* @param String description
* @param boolean rom
*/
public CD(String name, String description, boolean rom) {
super(name, description);
isRom = rom;
}
/**
* getter that returns whether the CD is secretly a ROM of a custom PC port of E.T. for Atari 2600 or not
*
*/
public boolean isRom() {
return isRom;
}
/**
* changes whether rom
* changes isRom to its opposite, so if it is true, then it become false. if it is false, it becomes true
*
*/
public void changeWhetherRom() {
isRom = !isRom;
}
}