-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathCustomerController.java
More file actions
37 lines (27 loc) · 1 KB
/
CustomerController.java
File metadata and controls
37 lines (27 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package legacy.controller;
import legacy.enums.CustomerStatus;
import legacy.model.CustomerManager;
import legacy.view.Console;
public class CustomerController {
CustomerManager manager = new CustomerManager();
Console console = new Console();
public void run() {
console.showCreateCustomer(
manager.createCustomer("101", "홍길동", CustomerStatus.ACTIVE)
);
console.showCreateCustomer(
manager.createCustomer("102", "이순신", CustomerStatus.ACTIVE)
);
console.showCreateCustomer(
manager.createCustomer("103", "강감찬", CustomerStatus.ACTIVE)
);
console.showAllCustomers(manager.getCustomers());
console.showUpdateCustomer(
manager.getOldName("101"),
manager.updateCustomer("101", "홍길순")
);
manager.deleteCustomer("102");
console.showDeleteCustomer("102");
console.showAllCustomers(manager.getCustomers());
}
}