- Beranda
- Programmer Forum
Membuat program mesin minuman (vendingmachine) dengan visual basic
...
![Suka.suka.gwLah](https://s.kaskus.id/user/avatar/2011/05/15/default.png)
![Avatar border](https://s.kaskus.id/images/avatarborder/1.gif)
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![Big Grin emoticon-Big Grin](https://s.kaskus.id/images/smilies/sumbangan/14.gif)
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());
}
}
}
![Toast emoticon-Toast](https://s.kaskus.id/images/smilies/smilies_fb5ly1iothbu.gif)
![Toast emoticon-Toast](https://s.kaskus.id/images/smilies/smilies_fb5ly1iothbu.gif)
![Toast emoticon-Toast](https://s.kaskus.id/images/smilies/smilies_fb5ly1iothbu.gif)
ane udah otak atik malah tambah eror
tolong pencerahannya gan
tolong di bantu ya
![Big Grin emoticon-Big Grin](https://s.kaskus.id/images/smilies/sumbangan/14.gif)
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());
}
}
}
![Toast emoticon-Toast](https://s.kaskus.id/images/smilies/smilies_fb5ly1iothbu.gif)
![Toast emoticon-Toast](https://s.kaskus.id/images/smilies/smilies_fb5ly1iothbu.gif)
![Toast emoticon-Toast](https://s.kaskus.id/images/smilies/smilies_fb5ly1iothbu.gif)
Diubah oleh Suka.suka.gwLah 16-11-2013 06:42
![tien212700](https://s.kaskus.id/user/avatar/2020/12/18/avatar10974720_1.gif)
tien212700 memberi reputasi
1
6.5K
17
![Guest](https://s.kaskus.id/user/avatar/default.png)
![Avatar border](https://s.kaskus.id/images/avatarborder/1.gif)
Komentar yang asik ya
Mari bergabung, dapatkan informasi dan teman baru!
![Programmer Forum](https://s.kaskus.id/r200x200/ficon/image-176.png)
Programmer Forum![KASKUS Official KASKUS Official](https://s.kaskus.id/kaskus-next/next-assets/images/icon-official-badge.svg)
20.2KThread•4.4KAnggota
Urutkan
Terlama
![Guest](https://s.kaskus.id/user/avatar/default.png)
![Avatar border](https://s.kaskus.id/images/avatarborder/1.gif)
Komentar yang asik ya