0% found this document useful (0 votes)
8 views5 pages

Laundry Management Program in Java

The document describes a laundry program with the following key details: 1. It allows users to input customer name, item weight, delivery date, and select regular or express service. 2. It calculates the price based on weight and service type, plus the delivery date. 3. It outputs a receipt with the customer and laundry details, including item weight, service type, dates, price and total cost.

Uploaded by

Bagus Kurniawan
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views5 pages

Laundry Management Program in Java

The document describes a laundry program with the following key details: 1. It allows users to input customer name, item weight, delivery date, and select regular or express service. 2. It calculates the price based on weight and service type, plus the delivery date. 3. It outputs a receipt with the customer and laundry details, including item weight, service type, dates, price and total cost.

Uploaded by

Bagus Kurniawan
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

 Program Loundry0.1.

package akhir;

import [Link];

public class loundry extends [Link] {

int tgl_msk,tgl_klr,tgl;

double berat,hrg,total;

String nama,prfm,jenis;

public loundry() {

initComponents();

public void reset(){

nama="";

berat=0.0;

jenis="";

tgl_msk=0;

tgl_klr=0;

prfm = "";

txt_nama.setText(nama);

txt_berat.setText("");

[Link]();

txt_masuktgl.setText("");

cmb_prfm.setSelectedItem("Pilih");

txt_tmpl.setText("");

public void getData(){

nama=txt_nama.getText();

berat=[Link](txt_berat.getText());

if(rd_reg.isSelected()){

jenis="Regular";

hrg=3500;

tgl=3;

}else{
jenis="Express";

hrg=7000;

tgl=1;

tgl_msk=[Link](txt_masuktgl.getText());

tgl_klr=tgl_msk+tgl;

if(tgl_klr>31){

tgl_klr=tgl_klr-31;

switch(cmb_prfm.getSelectedIndex()){

case 1:

prfm="Lily";

break;

case 2:

prfm="Aqua";

break;

case 3:

prfm="Fresh";

break;

default:

[Link](this, "Pilih Parfum dulu Cu");

break;

total=berat*hrg;

public void hitung(){

txt_tmpl.setText("Nama :"+nama

+"\nBerat : "+berat+" Kg"

+"\nJenis : "+jenis

+"\nMasuk : "+tgl_msk

+"\nSelesai : "+tgl_klr
+"\nParfum : "+prfm

+"\nTotal : "+total);

private void cmb_prfmActionPerformed([Link] evt) {

switch(cmb_prfm.getSelectedIndex()){

case 1:

prfm="Lily";

break;

case 2:

prfm="Aqua";

break;

case 3:

prfm="Fresh";

break;

default:

[Link](this, "Pilih Parfum dulu Cu");

break;

private void simpanActionPerformed([Link] evt) {

getData();

hitung();

private void clearActionPerformed([Link] evt) {

reset();

private void txt_masuktglActionPerformed([Link] evt) {

getData();

if(tgl_msk>31){

tgl_msk=0;

txt_masuktgl.setText("");

[Link](null,"Masukin Ulang");

tgl_msk=[Link](txt_masuktgl.getText());
}

 Program LoundryAsp.
package laundryjava;

import [Link].*;

import [Link];

public class laundry extends [Link] {

public String namaPelanggan,parfum,jenisLaundry;

public int berat,tglMsk,tglSlsai,total,harga,waktu;

public laundry() {

initComponents();

private void jRb1ActionPerformed([Link] evt) {

jenisLaundry = "Express";

private void jBtnProsesActionPerformed([Link] evt) {

try { //Mendeteksi kesalahan dengan exception handling

parfum = [Link]().toString();

berat = [Link]([Link]());

tglMsk = [Link]([Link]());

if([Link]()){

harga = 7000;

waktu = 1;

total = berat*harga;

}else if([Link]()){

harga = 3500;

waktu = 3;

total = berat*harga;

tglSlsai=tglMsk+waktu;
if(tglSlsai>31){

tglSlsai=tglSlsai-31;

[Link]("==================NOTA=================="

+"\nNama\t: "+[Link]()

+"\nBerat\t: "+[Link]()+" kg"

+"\nJenis Loundry\t: "+jenisLaundry

+"\nTanggal Masuk\t: "+[Link]()

+"\nTanggal Selesai: "+tglSlsai

+"\nParfum\t: "+parfum

+"\nTotal Bayar\t: "+total);

} catch (NumberFormatException e) {

[Link](this, "Pastikan Berat dan tanggal menggunakan


angka!");

private void jRb2ActionPerformed([Link] evt) {

jenisLaundry = "Reguler";

private void jBtnHapusActionPerformed([Link] evt) {

[Link]("");

[Link]("");

[Link]("");

[Link]("");

You might also like