From 98cef5e9a772602d42acfcf233838c760424db9a Mon Sep 17 00:00:00 2001 From: Nicolas James Date: Thu, 13 Feb 2025 18:00:17 +1100 Subject: initial commit --- comp2511/blackout/ElephantSatellite.java | 49 ++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 comp2511/blackout/ElephantSatellite.java (limited to 'comp2511/blackout/ElephantSatellite.java') 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 getFileStoreLimit() { + return Optional.empty(); // Undefined in spec? + } + @ Override + final protected Optional getByteStoreLimit() { + return Optional.of(90); // Max of 90 bytes. + } + @ Override + final protected Optional getByteDownloadSpeed() { + return Optional.of(20); // 20 bytes per minute. + } + @ Override + final protected Optional getByteUploadSpeed() { + return Optional.of(20); // 20 bytes per minute. + } +} \ No newline at end of file -- cgit v1.2.3