- Messages
- 1
- Reaction score
- 0
- Points
- 16
penge ng sample codes xa java tnx
Most of our features and services are available only to members, so we encourage you to login or register a new account. Registration is free, fast and simple. You only need to provide a valid email. Being a member you'll gain access to all member forums and features, post a message to ask question or provide answer, and share or find resources related to mobile phones, tablets, computers, game consoles, and multimedia.
All that and more, so what are you waiting for, click the register button and join us now! Ito ang website na ginawa ng pinoy para sa pinoy!
sir pa help po sa Polynomial addition,
Using C++;
Sample Input:
string poly1 = 4x^5 + 3x^4 + 3x + 10;
string poly2 = 4x^5 + 3x^4 + 3x + 10;
sir pa help po sa Polynomial addition,
Using C++;
Sample Input:
string poly1 = 4x^5 + 3x^4 + 3x + 10;
string poly2 = 4x^5 + 3x^4 + 3x + 10;
Sir may tanong po ako, pano po kaya ia-access ung data na nasa .dat file? Kasi po gagawa sana kami ng android application for weather forecasting. Yung data na kukunin po ay nasa .dat file. Pano po kaya kukunin un??? >.<
InputStream inputStream = getResources().openRawResource(R.raw.dictionary);
BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));
//then start reading lines from reader with reader.readLine()
.dat lang talaga ang source?
Why not use sqlite as data storage?
Anyway... this might help...
Got it somewhere in the net...
post your programming problems here....
tapos sample input and output...,,
i'll do my very best para po matulungan kayo
ang anyone who wants to help you're all welcome here...
welcome
Remember what you learned from algebra:
Add only like terms, and only add the numerical coefficients.
So since both polynomials are the same just multiply by 2 all the terms.
2(4x^5.....) via distrubutive property.
Remember what you learned from algebra:
Add only like terms, and only add the numerical coefficients.
So since both polynomials are the same just multiply by 2 all the terms.
2(4x^5.....) via distrubutive property.
package JCalculator;
import java.text.DecimalFormat;
import javax.print.DocFlavor;
public class NewJFrame extends javax.swing.JFrame {
double total1 = 0;
double total2 = 0;
double plusminus;
char math_operator;
int Decimal1;
public NewJFrame() {
initComponents();
}
private void getOperator(String btnText) {
math_operator = btnText.charAt(0);
total1 = total1 + Double.parseDouble(jTextField1.getText());
jTextField1.setText("");
private void jTextField1ActionPerformed(java.awt.event.ActionEvent evt) {
}
private void ClearActionPerformed(java.awt.event.ActionEvent evt) {
total2 = 0;
jTextField1.setText("");
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
jTextField1.setText(jTextField1.getText() + jButton1.getText());
}
private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {
jTextField1.setText(jTextField1.getText() + jButton5.getText());
}
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
jTextField1.setText(jTextField1.getText() + jButton2.getText());
}
private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {
jTextField1.setText(jTextField1.getText() + jButton3.getText());
}
private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {
jTextField1.setText(jTextField1.getText() + jButton4.getText());
}
private void jButton6ActionPerformed(java.awt.event.ActionEvent evt) {
jTextField1.setText(jTextField1.getText() + jButton6.getText());
}
private void jButton7ActionPerformed(java.awt.event.ActionEvent evt) {
jTextField1.setText(jTextField1.getText() + jButton7.getText());
}
private void jButton8ActionPerformed(java.awt.event.ActionEvent evt) {
jTextField1.setText(jTextField1.getText() + jButton8.getText());
}
private void jButton8ActionPerformed(java.awt.event.ActionEvent evt) {
jTextField1.setText(jTextField1.getText() + jButton8.getText());
}
private void jButton10ActionPerformed(java.awt.event.ActionEvent evt) {
jTextField1.setText(jTextField1.getText() + jButton10.getText());
}
private void PlusActionPerformed(java.awt.event.ActionEvent evt) {
String button_text = Plus.getText();
getOperator(button_text);
}
private void EqualsActionPerformed(java.awt.event.ActionEvent evt) {
switch ( math_operator ) {
case '+':
total2 = total1 + Double.parseDouble(jTextField1.getText());
break;
case '-':
total2 = total1 + Double.parseDouble(jTextField1.getText());
break;
case '/':
total2 = total1 + Double.parseDouble(jTextField1.getText());
break;
case '*':
total2 = total1 + Double.parseDouble(jTextField1.getText());
break;
}
jTextField1.setText( Double.toString(total2) );
total1 = 0;
}
private void DecimalActionPerformed(java.awt.event.ActionEvent evt) {
if (Decimal1==0)
jTextField1.setText(jTextField1.getText()+Decimal.getText());
Decimal1 = 1;
}
private void PlusminusActionPerformed(java.awt.event.ActionEvent evt) {
plusminus=(Double.parseDouble(String.valueOf(jTextField1.getText())));
plusminus=plusminus*(-1);
jTextField1.setText(String.valueOf(plusminus));
}
private void SubtractActionPerformed(java.awt.event.ActionEvent evt) {
String button_text = Subtract.getText();
getOperator(button_text);
}
private void DivideActionPerformed(java.awt.event.ActionEvent evt) {
String button_text = Divide.getText();
getOperator(button_text);
}
private void MultiplyActionPerformed(java.awt.event.ActionEvent evt) {
String button_text = Multiply.getText();
getOperator(button_text);
}
public static void main(String args[]) {
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
* For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
try {
for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(NewJFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(NewJFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(NewJFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(NewJFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
}
//</editor-fold>
/* Create and display the form */
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new NewJFrame().setVisible(true);
}
});
}