-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUserInterface.java
More file actions
30 lines (28 loc) · 892 Bytes
/
UserInterface.java
File metadata and controls
30 lines (28 loc) · 892 Bytes
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
import java.util.ArrayList;
import java.util.Scanner;
public class UserInterface {
void print(ArrayList<AddressBook> arrayList) {
for (AddressBook s : arrayList) {
System.out.println(s);
}
}
void enterDetails(AddressBook contact) {
Scanner sc = new Scanner(System.in);
System.out.println("Enter firstName");
contact.setFirstName(sc.nextLine());
System.out.println("Enter lastName");
contact.setLastName(sc.nextLine());
System.out.println("Enter Address");
contact.setAddress(sc.nextLine());
System.out.println("Enter city");
contact.setCity(sc.nextLine());
System.out.println("Enter state");
contact.setState(sc.nextLine());
System.out.println("Enter Zip Code");
contact.setZip(sc.nextLine());
System.out.println("Enter PhoneNumber");
contact.setPhoneNumber(sc.nextLine());
System.out.println("Enter Email");
contact.setEmail(sc.nextLine());
}
}