a
This commit is contained in:
1 parent
4b00d5838c
commit
a31c9233d0
3 files changed
+96
-4
No files matched your search
+4
-1
@@ -10,6 +10,9 @@ public class Test {
|
||||
boolean continueBuy = true;
|
||||
Scanner sc = new Scanner(System.in);
|
||||
while (continueBuy) {
|
||||
System.out.println("Ticket Seller: Five Yuan - " + ts.getFive() + ", Ten Yuan - " + ts.getTen()
|
||||
+ ", Twenty Yuan - " + ts.getTwenty() + ", Fifty Yuan - " + ts.getFifty() + ", Hundred Yuan - "
|
||||
+ ts.getHundred());
|
||||
System.out.print("Please enter your name: ");
|
||||
name = sc.nextLine();
|
||||
System.out.print("Please enter your payment: ");
|
||||
@@ -17,7 +20,7 @@ public class Test {
|
||||
Thread consumer = new Thread(ts, name + "-" + payment);
|
||||
consumer.start();
|
||||
try {
|
||||
consumer.join();
|
||||
Thread.sleep(1000);
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user