vendredi 10 septembre 2021

CheckBox Issues

so when 3 checkboxes was checked it will go in a CF method to count, but when i just check 1 of em, it give me nothing

                if (chkGejala2.isChecked() && || chkGejala4.isChecked() && chkGejala5.isChecked()){

                // Nilai Inputan dari PASIEN / USER
                //0.4 0.32 0.24
                double doubleGejala2 = Double.parseDouble(txtNilaiGejala2.getText().toString());
                double doubleGejala4 = Double.parseDouble(txtNilaiGejala4.getText().toString());
                double doubleGejala5 = Double.parseDouble(txtNilaiGejala5.getText().toString());

                double hasilHitunganGejala2 = nilaiGejala2 * doubleGejala2;
                double hasilHitunganGejala4 = nilaiGejala4 * doubleGejala4;
                double hasilHitunganGejala5 = nilaiGejala5 * doubleGejala5;
                
                //CF 
                double Combine_CF2_CF4  = hasilHitunganGejala2 + hasilHitunganGejala4 * (1 - hasilHitunganGejala2);
                double Combine_CFold_CF5  = Combine_CF2_CF4 + hasilHitunganGejala5 * (1 - Combine_CF2_CF4);

                String hasilHitungGejalaPenyakitA = String.valueOf((Combine_CFold_CF5 * 100));

                NamaPenyakit += "\nTipe 2"+"\n"+hasilHitungGejalaPenyakitA+" %";

            }

can u guys help me with that, thx u anyways Ps: sorry my english is bad




Aucun commentaire:

Enregistrer un commentaire