Equazioni di primo grado
App that solves first-degree equations.
Here is the embryonic version to be finished but already working that receives 2 inputs and calculates X.
The exercise is useful for learning how to use swing objects and associated methods. The code is in the click event of the button
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) { double a, b,x; String tmp; tmp =jTextField1.getText(); a=Double.parseDouble(tmp); tmp =jTextField2.getText(); b=Double.parseDouble(tmp); x=-b/a; jTextArea1.setText("Il risultato di "+a+"x+"+b+"=0" +" x="+x); } 

Studio Assistito con l'Intelligenza Artificiale
Vuoi padroneggiare al meglio i concetti di questo articolo? Avvia lo studio assistito per generare riassunti automatici, mappe concettuali o farti interrogare con il metodo socratico.