Pengaturan

Gambar

Lainnya

Tentang KASKUS

Pusat Bantuan

Hubungi Kami

KASKUS Plus

© 2024 KASKUS, PT Darta Media Indonesia. All rights reserved

Suka.suka.gwLahAvatar border
TS
Suka.suka.gwLah
Membuat program mesin minuman (vendingmachine) dengan visual basic
ini betulin nya gimana ya
ane udah otak atik malah tambah eror
tolong pencerahannya gan
tolong di bantu ya emoticon-Big Grin

public class VendingMachine1Main {
VendingMachine cansdrinks = new VendingMachineCansDrink(nofDrinks);
VendingMachine bottlesdrinks = new VendingMachinebottlesDrinks(nofDrinks);

int dollarbill;
int quarters;
int dimes;
int nickels;
}

public class void main VendingMachine1main{
VendingMachine machine= new VendingMachine();

Machine. fillup(10)cans; // fill up with ten cans
Machine. InsertToken();
Machine.InsertToken();
System.out.print("Token Count=");
System.out.println(Machine .getTokenCount());
System.out.print("can Count= ");
System.out.println(machine.getcanCount());
Machine. fillup(5)bottles; //fill up with five bottle
Machine. InsertToken();
Machine.InsertToken();
System.out.print("Token Count=");
System.out.println(Machine .getTokenCount());
System.out.print("bottle Count= ");
System.out.println(machine.getbottleCount());
}



public void{
Machine. fillup(9)cans; // fill up with ten cans
Machine. InsertToken();
Machine.InsertToken();
System.out.print("Token Count=");
System.out.println(Machine .getTokenCount());
System.out.print("can Count= ");
System.out.println(machine.getcanCount());
Machine. fillup(5)bottles; //fill up with five bottle
Machine. InsertToken();
Machine.InsertToken();
System.out.print("Token Count=");
System.out.println(Machine .getTokenCount());
System.out.print("bottle Count= ");
System.out.println(machine.getbottleCount());
}

public void {
Machine. fillup(9)cans; // fill up with ten cans
Machine. InsertToken();
Machine.InsertToken();
System.out.print("Token Count=");
System.out.println(Machine .getTokenCount());
System.out.print("can Count= ");
System.out.println(machine.getcanCount());
Machine. fillup(5)bottles; //fill up with five bottle
Machine. InsertToken();
Machine.InsertToken();
System.out.print("Token Count=");
System.out.println(Machine .getTokenCount());
System.out.print("bottle Count= ");
System.out.println(machine.getbottleCount());
}

public static void {
Machine. fillup(9)cans; // fill up with ten cans
Machine. InsertToken();
Machine.InsertToken();
System.out.print("Token Count=");
System.out.println(Machine .getTokenCount());
System.out.print("can Count= ");
System.out.println(machine.getcanCount());
Machine. fillup(3)bottles; //fill up with five bottle
Machine. InsertToken();
Machine.InsertToken();
System.out.print("Token Count=");
System.out.println(Machine .getTokenCount());
System.out.print("bottle Count= ");
System.out.println(machine.getbottleCount());


}
}
}


emoticon-Toastemoticon-Toastemoticon-Toast
Diubah oleh Suka.suka.gwLah 16-11-2013 06:42
tien212700
tien212700 memberi reputasi
1
6.5K
17
GuestAvatar border
Tulis komentar menarik atau mention replykgpt untuk ngobrol seru
Mari bergabung, dapatkan informasi dan teman baru!
Programmer Forum
Programmer ForumKASKUS Official
20.2KThread4.3KAnggota
Urutkan
Terlama
GuestAvatar border
Tulis komentar menarik atau mention replykgpt untuk ngobrol seru
Ikuti KASKUS di
© 2023 KASKUS, PT Darta Media Indonesia. All rights reserved.