forked from rick2785/JavaCode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDVDDevice.java
More file actions
34 lines (18 loc) · 592 Bytes
/
DVDDevice.java
File metadata and controls
34 lines (18 loc) · 592 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
// Concrete Implementor
// Here is an implementation of the EntertainmentDevice
// abstract class. I'm specifying what makes it different
// from other devices
public class DVDDevice extends EntertainmentDevice {
public DVDDevice(int newDeviceState, int newMaxSetting){
super.deviceState = newDeviceState;
super.maxSetting = newMaxSetting;
}
public void buttonFivePressed() {
System.out.println("DVD Skips to Chapter");
deviceState--;
}
public void buttonSixPressed() {
System.out.println("DVD Skips to Next Chapter");
deviceState++;
}
}