php-simple-naive-bayesian-classifier's People
php-simple-naive-bayesian-classifier's Issues
Praktikum Prolan
{
package newGUI;
import java.awt.;
import java.awt.event.;
public class NilaiAkhir extends Frame {
Label judul , ltugas, lkuis,luts,luas, lhasil;
TextField tugas, kuis, uts, uas, hasil;
CheckboxGroup cekbok = new CheckboxGroup();
Checkbox ASD, Pemlan, Matkomlan, probs;
Button Hitung=new Button("Hitung");
Button Tampilno=new Button("Tampilkan Nilai ");
TextArea kotak;
String hasilZ [] = new String [4];
String nilaiA;
String nilaiB;
String nilaiC;
String nilaiD;
String hasilB;
public NilaiAkhir(){
setLayout(null);
judul = new Label("Hitung Nilai Akhir");
judul.setFont(new Font("Calibri",1,14));
add(judul);
ltugas = new Label("Tugas : ");
add(ltugas);
ltugas.setBounds(100, 90, 62, 20);
lkuis = new Label("Kuis : ");
add(lkuis);
lkuis.setBounds(100, 120, 70, 20);
luts = new Label("UTS : ");
add(luts);
luts.setBounds(100, 150, 70, 20);
luas = new Label("UAS : ");
add(luas);
luas.setBounds(100, 180, 70, 20);
lhasil = new Label("Hasil : ");
add(lhasil);
lhasil.setBounds(100, 210, 70, 20);
tugas = new TextField("0");
add(tugas);
tugas.setBounds(200, 90, 60, 20);
kuis = new TextField("0");
add(kuis);
kuis.setBounds(200, 120, 60, 20);
uts = new TextField("0");
add(uts);
uts.setBounds(200, 150, 60, 20);
uas = new TextField("0");
add(uas);
uas.setBounds(200, 180, 60, 20);
hasil = new TextField("0");
hasil.setEditable(false);
add(hasil);
hasil.setBounds(200, 210, 60, 20);
judul.setBounds(100, 30, 170, 20);
ASD = new Checkbox("ASD", cekbok, false);
this.add(ASD).setBounds(20, 60, 40, 20);
ASD.addItemListener(new mainAction());
Pemlan = new Checkbox("Pemlan", cekbok,false);
this.add(Pemlan).setBounds(80, 60, 60, 20);
Pemlan.addItemListener(new mainAction());
Matkomlan=new Checkbox("Matkomlan", cekbok,false);
this.add(Matkomlan).setBounds(160, 60, 80, 20);
Matkomlan.addItemListener(new mainAction());
probs = new Checkbox("Probstat",cekbok,false);
this.add(probs).setBounds(260, 60, 80, 20);
probs.addItemListener(new mainAction());
add(Hitung);
Hitung.setBounds(150, 240, 60, 30);
Hitung.addActionListener(new controlB());
kotak = new TextArea();
add(kotak);
kotak.setBounds(50, 290, 240, 130);
add(Tampilno);
Tampilno.setBounds(120, 430, 100, 30);
Tampilno.addActionListener(new controlT());
}
class mainAction implements ItemListener {
public void itemStateChanged(ItemEvent e) {
if (ASD.getState()==true){
set();
}
else if (Pemlan.getState()==true) {
set();
}
else if(Matkom.getState()==true){
set();
}
else if(probs.getState()==true){
set();
}
}
public void set(){
kuis.setText("0");
tugas.setText("0");
uts.setText("0");
uas.setText("0");
hasil.setText("0");
}
}
public class controlB implements ActionListener{
@OverRide
public void actionPerformed(ActionEvent satu) {
int tugasB= Integer.parseInt(tugas.getText().trim());
int kuisB=Integer.parseInt(kuis.getText().trim());
int utsB=Integer.parseInt(uts.getText().trim());
int uasB=Integer.parseInt(uas.getText().trim());
if (ASD.getState()==true){
hasilZ[0]=String.valueOf((tugasB/4)+(kuisB/4)+(utsB/4)+(uasB/4));
hasil.setText(hasilZ[0]);
}
else if (Pemlan.getState()==true) {
hasilZ[1]=String.valueOf((tugasB/4)+(kuisB/4)+(utsB/4)+(uasB/4));
hasil.setText(hasilZ[1]);
}
else if(Matkom.getState()==true){
hasilZ[2]=String.valueOf((tugasB/4)+(kuisB/4)+(utsB/4)+(uasB/4));
hasil.setText(hasilZ[2]);
}
else if(probs.getState()==true){
hasilZ[3]=String.valueOf((tugasB/4)+(kuisB/4)+(utsB/4)+(uasB/4));
hasil.setText(hasilZ[3]);
}
}
}
public class controlT implements ActionListener{
@Override
public void actionPerformed(ActionEvent arg0) {
String nilaiakhir="HASIL NILAI SEMUA MATAKULIAH \n"+
"ASD : "+hasilZ[0]+"\n"+
"Pemlan : "+hasilZ[1]+"\n"+
"Matkomlan : "+hasilZ[2]+"\n"+
"Probstat : "+hasilZ[3];
kotak.setText(nilaiakhir);
}
}
}
}
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.