import java.io.*;
import javax.swing.*;

class refrigeranttest
{
public static void main(String arg[])
{   //refrigerant g;
    refrigerant g;
	String isim;
    while(true)
	{
    isim=JOptionPane.showInputDialog("soğutucu akışkan ismi :  ");
    g=new refrigerant(isim);
	double t =Double.parseDouble(JOptionPane.showInputDialog(" t (derece C) : ")); 
    //double P =Double.parseDouble(JOptionPane.showInputDialog(" P (kPa  ) : "));  
    double P=g.Ps(t);
    double v=g.v_tP(t,P);   
    String s=g.r.refrigerantName+"\n";
	s+="v = "+v+" m^3/kg \n";
	s+="P = "+g.P(t,v)+" kPa\n";
	s+="dP/dT = "+g.dPdT(t,v)+"\n";
	s+="dP/dT sayısal = "+g.dPdT_say(t,v)+"\n";
	s+="Cp  = "+g.Cp(t)+"\n";
	s+="Cv  = "+g.Cv(t)+"\n";
	s+="M   = "+g.r.M+"\n";
	s+="Cp/Cv  = "+g.Cp(t)/g.Cv(t)+"\n";
	s+="u = "+g.u(t,v)+"\n";
	s+="h = "+g.h(t,v)+"\n";	
	s+="s = "+g.s(t,v)+"\n";	
	s+="ro = "+1.0/v+"\n";	
    JOptionPane.showMessageDialog(null,s,"deneme", JOptionPane.PLAIN_MESSAGE);
    }
}
}