public class grados
{
double gcelsius;
//atributos
grados()
{
}//cons default
grados (double gc)
{
gcelsius = gc;
}//cons inicializacion
double convkelvin ()
{
double gk;
gk = gcelsius + 273.15;
return gk;
} //met conv kelvin
double convfahr ()
{
double gf;
gf = 1.8*gcelsius +32;
return gf;
} // met conv fahrenheit
void set_grados (double gc)
{
gcelsius = gc;
} //met para dar el valor a gcelsius
}// clase grados
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.