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/StandardSatellite.java | 46 ++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 comp2511/blackout/StandardSatellite.java (limited to 'comp2511/blackout/StandardSatellite.java') diff --git a/comp2511/blackout/StandardSatellite.java b/comp2511/blackout/StandardSatellite.java new file mode 100644 index 0000000..10777b3 --- /dev/null +++ b/comp2511/blackout/StandardSatellite.java @@ -0,0 +1,46 @@ +package unsw.blackout; + +import java.util.Optional; + +import unsw.utils.Angle; + +public class StandardSatellite extends SatelliteBase { + public StandardSatellite(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 150_000.0; + } + @ Override + final protected boolean isSupportedDeviceType(String type) { + if (type.equals(LaptopDevice.class.getSimpleName())) { + return true; + } else if (type.equals(HandheldDevice.class.getSimpleName())) { + return true; + } + return false; + } + @ Override + final protected Optional getFileStoreLimit() { + return Optional.of(3); // Max of 3 files. + } + @ Override + final protected Optional getByteStoreLimit() { + return Optional.of(80); // Max of 80 bytes. + } + @ Override + final protected Optional getByteDownloadSpeed() { + return Optional.of(1); // 1 byte per minute. + } + @ Override + final protected Optional getByteUploadSpeed() { + return Optional.of(1); // 1 byte per minute. + } +} + -- cgit v1.2.3