Visualizza i risultati del sondaggio: come è il programmino

Chi ha votato
1. Non puoi votare questo sondaggio
  • bel programma

    1 100.00%
  • abastanza bello manca proprio i disegni

    0 0%
  • discreto manca molte cose

    0 0%
  • programma inutile brutto e manca di tt con codici carenti

    0 0%
Sondaggio singolo o multiplo.
Visualizzazione dei risultati da 1 a 4 su 4

Visualizzazione discussione

  1. #1

    Aiuto programmino JAVA Parabola GA?

    ciao a tt ho apperto questa discussione x kiedere a tt 2 cose su java.
    1) cosigli
    2) un codice
    3)cosa aggiungere
    4) come perferzionare
    5) guide nel web
    6) guida immediata e dettagliata.
    io nn riesco a finire un programmino sulla geometria analitica (La Parabola) sapendo le regole di matematica ho ragionato e pensato di creare un programmino per creare una parabola solo che è po' che mi sono bloccato xk mi manca un codice per usare una label per iserirci un icona creata da paint cosi ogni caso hs il suo disegno. praticamente direi di aver finito ma ci vorrei aggiungere tale codice che secondo me rende il programmino più bello dal punto di vista grafico non solo un programma + completo.
    qui sotto è il lavoro fatto fin ora seguendo l'elenco qui sopra vorrei gentilmente e presto risposte inoltre come consigli vorrei sapere se è possibile o meno usare i cicli tipo il while e il for alposto dei if che ho messo xk io c'è li metterei ma nn so se puo mi funziona il programma anke xk nn li sto gestire molto bn xk sn alle prime armi e vorrei semplicare il codice usato ma nn so come farlo. scs gli errori di grammatica. :master:

    Double A = new Double (txtA.getText());
    Double B = new Double (txtB.getText());
    Double C = new Double (txtC.getText());
    String AsseX = " Y = 0.0 " ;
    String AsseY = " X = 0.0 " ;
    String Origine = " 0.0 ; 0.0 ";
    if(A!=0.0){
    if(A>=0.0)
    {
    Double Delta = new Double (Math.pow(B, 2.0))-(4.0*(A)*(C));
    if(Delta<0.0)
    {
    Double X1 = 0.0;
    Double X2 = 0.0;
    Double YV = new Double(-(Delta)) / (4.0 * A);
    Double XF = new Double(-B) / (2.0 * A);
    Double YF = new Double(-(Delta) / (4.0 * A)) + (1.0 / (4.0 * A));
    txtF.setText(XF.toString() + "" + ";" + YF.toString());
    txtV.setText(XF.toString() + "" + ";" + YV.toString());
    txtD.setText("Y" + "" + "=" + XF.toString() + "" + "-" + YF.toString());
    txtASimm.setText("X" + "" + "=" + XF.toString());
    txtConcavita.setText("Parabola con Concavita verso l'alto");
    Double AX1 = new Double(A * (Math.pow(X1, 2.0)));
    Double BX2 = new Double(A * (Math.pow(X2, 1.0)));
    txtP.setText("Y" + "" + "=" + AX1.toString() + "" + "+" + BX2.toString() + "" + "+" + C.toString());
    txtintX1.setText(X1.toString() + "" + ";" + "0");
    txtintX2.setText(X2.toString() + "" + ";" + "0");
    txtintY.setText("0" + "" + ";" + "" + C.toString());
    txtintD.setText("Parabola Esterna");
    }
    else if (Delta ==0.0)
    {
    Double X1 = new Double((-B)+(Math.pow(Delta, 0.5)))/(2.0*A);
    Double X2 = X1;
    Double YV = new Double (-(Delta))/(4.0*A);
    Double XF = new Double(-B)/(2.0*A);
    Double YF = new Double (-(Delta)/(4.0*A))+(1.0/(4.0*A));
    txtF.setText(XF.toString() +"" +";"+YF.toString());
    txtV.setText(XF.toString()+""+";"+YV.toString());
    txtD.setText("Y" +""+"="+ XF.toString() + "" + "-"+ YF.toString());
    txtASimm.setText("X"+""+"="+XF.toString());
    txtConcavita.setText("Parabola con Concavita verso l'alto");
    Double AX1 = new Double (A*(Math.pow(X1, 2.0)));
    Double BX2 = new Double (A*(Math.pow(X2, 1.0)));
    txtP.setText("Y"+""+"="+AX1.toString()+""+"+"+BX2. toString()+""+"+"+C.toString());
    txtintX1.setText(X1.toString()+""+";"+"0");
    txtintX2.setText(X2.toString()+""+";"+"0");
    txtintY.setText("0"+""+";"+""+C.toString());
    txtintD.setText("Parabola Seccante");
    }
    else if(Delta >0)
    {
    Double X1 = new Double((-B)+(Math.pow(Delta, 0.5)))/(2.0*A);
    Double X2 = new Double((-B)-(Math.pow(Delta, 0.5)))/(2.0*A);
    Double YV = new Double (-(Delta))/(4.0*A);
    Double XF = new Double(-B)/(2.0*A);
    Double YF = new Double (-(Delta)/(4.0*A))+(1.0/(4.0*A));
    txtF.setText(XF.toString() +"" +";"+YF.toString());
    txtV.setText(XF.toString()+""+";"+YV.toString());
    txtD.setText("Y" +""+"="+ XF.toString() + "" + "-"+ YF.toString());
    txtASimm.setText("X"+""+"="+XF.toString());
    txtConcavita.setText("Parabola con Concavita verso l'alto");
    Double AX1 = new Double (A*(Math.pow(X1, 2.0)));
    Double BX2 = new Double (A*(Math.pow(X2, 1.0)));
    txtP.setText("Y"+""+"="+AX1.toString()+""+"+"+BX2. toString()+""+"+"+C.toString());
    txtintX1.setText(X1.toString()+""+";"+"0");
    txtintX2.setText(X2.toString()+""+";"+"0");
    txtintY.setText("0"+""+";"+""+C.toString());
    txtintD.setText("Parabola Tagente");
    }
    }else{
    Double Delta = new Double (Math.pow(B, 2.0))-(4.0*(A)*(C));
    if(Delta<0.0)
    {
    Double X1=0.0;
    Double X2=0.0;
    Double YV = new Double (-(Delta))/(4.0*A);
    Double XF = new Double(-B)/(2.0*A);
    Double YF = new Double (-(Delta)/(4.0*A))+(1.0/(4.0*A));
    txtF.setText(XF.toString() +"" +";"+YF.toString());
    txtV.setText(XF.toString()+""+";"+YV.toString());
    txtD.setText("Y" +""+"="+ XF.toString() + "" + "-"+ YF.toString());
    txtASimm.setText("X"+""+"="+XF.toString());
    txtConcavita.setText("Parabola con Concavita verso il basso");
    Double AX1 = new Double (A*(Math.pow(X1, 2.0)));
    Double BX2 = new Double (A*(Math.pow(X2, 1.0)));
    txtP.setText("Y"+""+"="+AX1.toString()+""+"+"+BX2. toString()+""+"+"+C.toString());
    txtintX1.setText(X1.toString()+""+";"+"0");
    txtintX2.setText(X2.toString()+""+";"+"0");
    txtintY.setText("0"+""+";"+""+C.toString());
    txtintD.setText("Parabola Esterna");
    }
    else if (Delta ==0.0)
    {
    Double X1 = new Double((-B)+(Math.pow(Delta, 0.5)))/(2.0*A);
    Double X2 = X1;
    Double YV = new Double (-(Delta))/(4.0*A);
    Double XF = new Double(-B)/(2.0*A);
    Double YF = new Double (-(Delta)/(4.0*A))+(1.0/(4.0*A));
    txtF.setText(XF.toString() +"" +";"+YF.toString());
    txtV.setText(XF.toString()+""+";"+YV.toString());
    txtD.setText("Y" +""+"="+ XF.toString() + "" + "-"+ YF.toString());
    txtASimm.setText("X"+""+"="+XF.toString());
    txtConcavita.setText("Parabola con Concavita verso il basso");
    Double AX1 = new Double (A*(Math.pow(X1, 2.0)));
    Double BX2 = new Double (A*(Math.pow(X2, 1.0)));
    txtP.setText("Y"+""+"="+AX1.toString()+""+"+"+BX2. toString()+""+"+"+C.toString());
    txtintX1.setText(X1.toString()+""+";"+"0");
    txtintX2.setText(X2.toString()+""+";"+"0");
    txtintY.setText("0"+""+";"+""+C.toString());
    txtintD.setText("Parabola Seccante");
    }
    else if(Delta >0)
    {
    Double X1 = new Double((-B)+(Math.pow(Delta, 0.5)))/(2.0*A);
    Double X2 = new Double((-B)-(Math.pow(Delta, 0.5)))/(2.0*A);
    Double YV = new Double (-(Delta))/(4.0*A);
    Double XF = new Double(-B)/(2.0*A);
    Double YF = new Double (-(Delta)/(4.0*A))+(1.0/(4.0*A));
    txtF.setText(XF.toString() +"" +";"+YF.toString());
    txtV.setText(XF.toString()+""+";"+YV.toString());
    txtD.setText("Y" +""+"="+ XF.toString() + "" + "-"+ YF.toString());
    txtASimm.setText("X"+""+"="+XF.toString());
    txtConcavita.setText("Parabola con Concavita verso il basso");
    Double AX1 = new Double (A*(Math.pow(X1, 2.0)));
    Double BX2 = new Double (A*(Math.pow(X2, 1.0)));
    txtP.setText("Y"+""+"="+AX1.toString()+""+"+"+BX2. toString()+""+"+"+C.toString());
    txtintX1.setText(X1.toString()+""+";"+"0");
    txtintX2.setText(X2.toString()+""+";"+"0");
    txtintY.setText("0"+""+";"+""+C.toString());
    txtintD.setText("Parabola Tagente");
    }
    }
    }else
    {
    txtA.setText("");
    txtB.setText("");
    txtC.setText("");
    txtD.setText("");
    txtintD.setText("");
    txtintX1.setText("");
    txtintX2.setText("");
    txtintY.setText("");
    txtV.setText("");
    txtF.setText("");
    txtP.setText("");
    txtASimm.setText("");
    }
    }
    ditemi se c'è qualcosa ke manca oltre ai disegni x completare e perferzionare il programma. sopratutto codici.... magari come sostituire uno + switch per il delta al posto degli if
    Immagini allegate Immagini allegate

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.