- Beranda
- Programmer Forum
Membuat program mesin minuman (vendingmachine) dengan visual basic
...
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
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());
}
}
}
ane udah otak atik malah tambah eror
tolong pencerahannya gan
tolong di bantu ya
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());
}
}
}
Diubah oleh Suka.suka.gwLah 16-11-2013 06:42
tien212700 memberi reputasi
1
6.5K
17
Tulis komentar menarik atau mention replykgpt untuk ngobrol seru
Mari bergabung, dapatkan informasi dan teman baru!
Programmer Forum
20.2KThread•4.3KAnggota
Urutkan
Terlama
Tulis komentar menarik atau mention replykgpt untuk ngobrol seru