ciao a tutti ho apperto questa discussione per chiedere a tutti due cose alcune java.
1) cosigli
2) un codice
3)cosa aggiungere
4) come perferzionare
5) guide nel web
6) guida immediata e dettagliata.
io non 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 perchè mi manca un codice per usare una label per iserirci un icona creata da paint cosi ogni caso ho 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 più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 perchè io c'è li metterei ma nn so se puo mi funziona il programma anche perchè non li sto gestire molto bene perchè sn alle prime armi e vorrei semplicare il codice usato ma nn so come farlo. scs gli errori di grammatica.
codice:
 private void ParabolaActionPerformed(java.awt.event.ActionEvent evt) { 
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 che manca oltre ai disegni per completare e perferzionare il programma. sopratutto codici.... magari come sostituire uno più switch per il delta al posto degli if.

ho rimesso la stessa guida senza sondaggio perchè ho avuto molte lamentele nella compressione della mia discussione spero che quest'ultima modifica della discussione sia compressibile che dire avoi i commenti.


premetto che molto codice di non lo conosco soppratutto non so se incide nella creazione del programma molte istruzioni ho usato il mouse per crearle o meglio per creare tale programma uso netbeans se lo conoscete mandatemi dei consigli su come usare meglio netbeans versione 6.8.1 in pratica molto è grazie ad esso il resto è conoscenza matematica forse scarsa ma forse quello che serve per il programma.