aboutsummaryrefslogtreecommitdiff
path: root/comp2511/blackout/StandardSatellite.java
blob: 10777b37f9f7907a5611604b5203cc52279b1eb8 (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
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<Integer> getFileStoreLimit() {
        return Optional.of(3); // Max of 3 files.
    }
    @ Override
    final protected Optional<Integer> getByteStoreLimit() {
        return Optional.of(80); // Max of 80 bytes.
    }
    @ Override
    final protected Optional<Integer> getByteDownloadSpeed() {
        return Optional.of(1); // 1 byte per minute.
    }
    @ Override
    final protected Optional<Integer> getByteUploadSpeed() {
        return Optional.of(1); // 1 byte per minute.
    }
}