Patulong po dito sa applet coding ko di po kasi mag divide. ty po. ayaw po gumawa yung divide 4 may mali po ba dito. ang nalabas kase sa halip na 91 nagiging 295. di ko po alam kung bakit kung hindi naman po nagana yung divide dapat 364 po sagot. ano po ba mali.
public void actionPerformed(ActionEvent objEvent){
int ave=0;
if(objEvent.getSource()==cmdCalculate)
{
ave=Integer.parseInt(txtProgramming.getText())+Integer.parseInt(txtDatabase.getText())+Integer.parseInt(txtPhilosophy.getText())+Integer.parseInt(txtLiterature.getText())/4;
txtGeneralAverage.setText(String.valueOf(ave));
public void actionPerformed(ActionEvent objEvent){
int ave=0;
if(objEvent.getSource()==cmdCalculate)
{
ave=Integer.parseInt(txtProgramming.getText())+Integer.parseInt(txtDatabase.getText())+Integer.parseInt(txtPhilosophy.getText())+Integer.parseInt(txtLiterature.getText())/4;
txtGeneralAverage.setText(String.valueOf(ave));
Last edited: