diff options
Diffstat (limited to 'comp2511/blackout/ElephantSatellite.java')
| -rw-r--r-- | comp2511/blackout/ElephantSatellite.java | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/comp2511/blackout/ElephantSatellite.java b/comp2511/blackout/ElephantSatellite.java new file mode 100644 index 0000000..79e2cd1 --- /dev/null +++ b/comp2511/blackout/ElephantSatellite.java @@ -0,0 +1,49 @@ +package unsw.blackout; + +import java.util.Optional; + +import unsw.utils.Angle; + +public class ElephantSatellite extends SatelliteBase { + public ElephantSatellite(String satelliteID, double height, Angle position) { + super(satelliteID, height, position); + } + + @ Override + final public double getVelocity() { + return 2_500.0; + } + @ Override + final public double getRange() { + return 400_000.0; + } + @ Override + final public boolean canTransient() { + return true; + } + @ Override + final protected boolean isSupportedDeviceType(String type) { + if (type.equals(DesktopDevice.class.getSimpleName())) { + return true; + } else if (type.equals(LaptopDevice.class.getSimpleName())) { + return true; + } + return false; + } + @ Override + final protected Optional<Integer> getFileStoreLimit() { + return Optional.empty(); // Undefined in spec? + } + @ Override + final protected Optional<Integer> getByteStoreLimit() { + return Optional.of(90); // Max of 90 bytes. + } + @ Override + final protected Optional<Integer> getByteDownloadSpeed() { + return Optional.of(20); // 20 bytes per minute. + } + @ Override + final protected Optional<Integer> getByteUploadSpeed() { + return Optional.of(20); // 20 bytes per minute. + } +}
\ No newline at end of file |
