-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJet.java
More file actions
33 lines (24 loc) · 776 Bytes
/
Jet.java
File metadata and controls
33 lines (24 loc) · 776 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
package com.dj;
public class Jet implements FlightEnabled,Trackable{
@Override
public void takeOff() {
System.out.println(getClass().getSimpleName() + " is taking off");
}
@Override
public void land() {
System.out.println(getClass().getSimpleName() + " is landing");
}
@Override
public void fly() {
System.out.println(getClass().getSimpleName() + " is flying");
}
@Override
public void track() {
System.out.println(getClass().getSimpleName() + "'s coordinates were recorded");
}
@Override
public FlightStages transition(FlightStages stage) {
System.out.println(getClass().getSimpleName() + " transitioning");
return FlightEnabled.super.transition(stage);
}
}