-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAircraftSpecs.java
65 lines (53 loc) · 1.82 KB
/
AircraftSpecs.java
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
public class AircraftSpecs {
private int type;
private String name;
private double landingSpeed, takeOffSpeed; // Landing and Takeoff speed in knots
private double maxFlightSpeed; // Normal flight speed in knots
private int maxAlt; // Maximum Altitude in feets
private double ascDescRate; // Ascent and Descent Rate in ft/min
private int fuelConsumptionRate; //
private int maxFuelWeight;
public AircraftSpecs(int type, String name, int landingSpeed, int maxFlightSpeed,
int maxFuelWeight, int maxAlt, int ascDescRate, int fuelConsumptionRate) {
this.type = type;
this.name = name;
this.landingSpeed = ((double) landingSpeed) / 3600;
this.takeOffSpeed = ((double) landingSpeed) / 3600;
this.maxFlightSpeed = ((double) maxFlightSpeed) / 3600;
this.maxAlt = maxAlt;
this.ascDescRate = ((double) ascDescRate) / 60 ;
this.fuelConsumptionRate = fuelConsumptionRate;
this.maxFuelWeight = maxFuelWeight;
}
public String getName() {
return name;
}
public int getType() {
return type;
}
public double getLandingSpeed() {
return landingSpeed;
}
public double getTakeOffSpeed() {
return takeOffSpeed;
}
public int getMaxAlt() {
return maxAlt;
}
public double getMaxFlightSpeed() {
return maxFlightSpeed;
}
public double getAscDescRate() {
return ascDescRate;
}
public int getFuelConsumptionRate() {
return fuelConsumptionRate;
}
public int getMaxFuelWeight() {
return maxFuelWeight;
}
public void print() {
System.out.println("Type:" + type + " landingSpeed: " + landingSpeed
+ " maxFlightSpeed:" + maxFlightSpeed + " maxFuel:" + maxFuelWeight + " maxAlt:" + maxAlt);
}
}