public class Apligradosfor
{
public static void main (String[] args)
{
double gc;
double a;
// generamos un objeto
//heredero de la clase soporte grados
grados gradito= new grados();
a=1;
System.out.println ("Centigrados" + "\t"+"Farenheit" + "\t" + "Kelvin");
for(a=1;a<=100;a++){
gc=a;
gradito.set_grados(gc); //asina el valor al atributo gcelsius
System.out.print(gradito.gcelsius + "\t");//invocacion de metodos
System.out.print("\t" +gradito.convfahr() + "\t");//invocacion de metodos
System.out.println("\t" +gradito.convkelvin());//invocacion de metodos
}
}//main
}//clase aplicacion
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.