package uk.co.craigwarren.gascalc.model;

public class Cylinder {
	
	private double volume;
	private double pressure;
	private Gas gas;
	private double ambientTemperatureKelvin;
	
	public double getVolume() {
		return volume;
	}
	public void setVolume(double volume) {
		this.volume = volume;
	}
	public double getPressure() {
		return pressure;
	}
	public void setPressure(double pressure) {
		this.pressure = pressure;
	}
	public Gas getGas() {
		return gas;
	}
	public void setGas(Gas gas) {
		this.gas = gas;
	}
	
	public Cylinder(double volume, double pressure, Gas gas) {
		this.volume = volume;
		this.pressure = pressure;
		this.gas = gas;
	}
	
	public Cylinder(double volume, double pressure) {
		this(volume, pressure, Gas.air());
	}
	
	public Cylinder(double volume) {
		this(volume, 0);
	}
    public double getAmbientTemperatureKelvin() {
        return ambientTemperatureKelvin;
    }
    public void setAmbientTemperatureKelvin(double ambientTemperatureKelvin) {
        this.ambientTemperatureKelvin = ambientTemperatureKelvin;
    }

}

@@ -563,27 +563,162 @@
 ure, Gas gas
-) %7B
+, double tempKelvin) %7B%0A%09    if(tempKelvin == 0.0) %7B%0A%09        throw new IllegalArgumentException(%22Cannot mix gas at absolute zero%22);%0A%09    %7D
 %0A%09%09this.volu
@@ -768,32 +768,78 @@
 this.gas = gas;%0A
+%09%09this.ambientTemperatureKelvin = tempKelvin;%0A
 %09%7D%0A%09%0A%09public Cyl
@@ -874,24 +874,24 @@
 pressure) %7B%0A
-
 %09%09this(volum
@@ -912,16 +912,22 @@
 as.air()
+, 20.0
 );%0A%09%7D%0A%09%0A

Add temperature to cylinder constructor