|
static void | main (String[] args) |
|
Definition at line 1 of file SmithJob.java.
◆ getName()
String SmithJob.getName |
( |
| ) |
|
|
inlineprivate |
◆ main()
static void SmithJob.main |
( |
String[] | args | ) |
|
|
inlinestatic |
Definition at line 4 of file SmithJob.java.
4 {
8 mrSmith.setName("Mr. Smith");
9 mrsSmith.setName("Mrs. Smith");
10 mrSmith.start();
11 mrsSmith.start();
12 }
◆ makeWithdrawal()
void SmithJob.makeWithdrawal |
( |
int | amount | ) |
|
|
inlineprivate |
Definition at line 20 of file SmithJob.java.
20 {
22 System.out.println(
getName() +
" is about to withdraw");
23 try {
24 System.out.println(
getName() +
" is going to sleep");
26 } catch (Exception ex) { ex.printStackTrace(); }
27 System.out.println(
getName() +
" wakes up");
29 System.out.println(
getName() +
" completes the withdrawal");
31 System.out.println("Overdrawn!");
32 }
33 }
34 else {
35 System.out.println(
"Not enough money for " +
getName());
36 }
37 }
void withdraw(int amount)
References account, BankAccount.getBalance(), getName(), and BankAccount.withdraw().
Referenced by run().
◆ run()
◆ account
The documentation for this class was generated from the following file: