aboutsummaryrefslogtreecommitdiff
path: root/comp2511/blackout/ElephantSatellite.java
blob: 79e2cd14b64691cb6c3533ade9dfa1a4db0ebc4d (plain)
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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.
    }
}