0% found this document useful (0 votes)
6 views6 pages

Java Patient Room Booking System

This document contains the code for a Java program that calculates hospital room rates and total costs based on room type, patient type, and length of stay. It includes code blocks that handle selections from dropdown menus and radio buttons to determine the room rate, multiply the rate by the length of stay to calculate the total, and include buttons to restart or exit the program.

Uploaded by

cahyoenggar
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views6 pages

Java Patient Room Booking System

This document contains the code for a Java program that calculates hospital room rates and total costs based on room type, patient type, and length of stay. It includes code blocks that handle selections from dropdown menus and radio buttons to determine the room rate, multiply the rate by the length of stay to calculate the total, and include buttons to restart or exit the program.

Uploaded by

cahyoenggar
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd

Nama: Cahyo Enggar Nugroho NIM : 11101263

Kelas : 11.5AB.01.D Tampilan Program :

Code :

public class kamar_pasien extends [Link] { String kode, ruangan; int tarif, total; //KODE KAMAR private void cbkodeActionPerformed([Link] evt) { // TODO add your handling code here: if([Link]().equals("KKA")) { [Link]("VIP"); [Link](); [Link]("Permata"); [Link]("Berlian"); } else if([Link]().equals("KKB")) { [Link]("Kelas 1"); [Link](); [Link]("Melati"); [Link]("Anggrek"); } else { [Link]("Kelas 2"); [Link](); [Link]("Merah"); [Link]("Putih"); } }

//KODE RADIO BUTTON ANAK

private void ranakActionPerformed([Link] evt) { // TODO add your handling code here: if([Link]()) { if([Link]().equals("KKA")) { if([Link]().equals("Permata")) { tarif=400000; } else { tarif=300000; } } else if([Link]().equals("KKB")) { if([Link]().equals("Melati")) { tarif=275000; } else { tarif=250000; } } else { if([Link]().equals("Merah")) {

tarif=200000; } else { tarif=150000; } } [Link]([Link](tarif)); } } //KODE RADIO BUTTON DEWASA private void rdewasaActionPerformed([Link] evt) { // TODO add your handling code here: if([Link]()) { if([Link]().equals("KKA")) { if([Link]().equals("Permata")) { tarif=600000; } else { tarif=500000; } } else if([Link]().equals("KKB")) { if([Link]().equals("Melati")) {

tarif=375000; } else { tarif=350000; } } else { if([Link]().equals("Merah")) { tarif=300000; } else { tarif=250000; } } [Link]([Link](tarif)); } } //KODE HITUNG LAMA INAP private void tlamainapActionPerformed([Link] evt) { // TODO add your handling code here: total=[Link]([Link]()) * tarif; [Link]([Link](total)); }

//KODE BUTTON LAGI

private void blagiActionPerformed([Link] evt) { // TODO add your handling code here: [Link](""); [Link]("KKA"); [Link](""); [Link]("Permata"); [Link](); [Link](""); [Link](""); [Link](""); }

//KODE BUTTON KELUAR private void bselesaiActionPerformed([Link] evt) { // TODO add your handling code here: int a=[Link](null, "Keluar Dari Program?", "Konfirmasi", JOptionPane.YES_NO_OPTION); if(a==JOptionPane.YES_OPTION) [Link]('0'); else return; }

You might also like