-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathCustomer.java
More file actions
45 lines (38 loc) · 1.08 KB
/
Copy pathCustomer.java
File metadata and controls
45 lines (38 loc) · 1.08 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
37
38
39
40
41
42
43
44
45
package com.psl.order;
public class Customer {
int id;
String name;
String homePhone, workPhone, cellPhone;
String street, city, state, zip;
int purchaseOrderNumber;
public Customer(int id, String name) {
// TODO Auto-generated constructor stub
this.id = id;
this.name = name;
}
void printPhoneNumbers() {
// TODO Auto-generated method stub
System.out.println("Ph: " +homePhone+ "(h), " +cellPhone+ "(m), " +workPhone + "(w)\n");
}
void printShippingAddress() {
// TODO Auto-generated method stub
System.out.println(street+ ", " +city+ ", " +state+ "\nPin Code: " +zip);
}
void setPrintingAddress(String state, String city, String street, String zip) {
// TODO Auto-generated method stub
this.street = street;
this.city = city;
this.state = state;
this.zip = zip;
}
void setPhoneNumbers(String hPhone, String cPhone, String wPhone) {
// TODO Auto-generated method stub
this.cellPhone = cPhone;
this.homePhone = hPhone;
this.workPhone = wPhone;
}
void printCustomer() {
// TODO Auto-generated method stub
System.out.println(id+ ". " +name);
}
}