-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCustomerMain.java
More file actions
31 lines (22 loc) · 863 Bytes
/
CustomerMain.java
File metadata and controls
31 lines (22 loc) · 863 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
31
package day2;
public class CustomerMain {
Customer CreateCustomer(int CustomerId,String CustomerName,String CustomerAddress){
Customer customer=new Customer();
customer.setCustomerId(CustomerId);
customer.setCustomerName(CustomerName);
customer.setCustomerAddress(CustomerAddress);
return customer;
}
public void display(Customer customer)
{
System.out.println("Customer Id , Name, Address ::"+customer.getCustomerId()+" "+customer.getCustomerName()+" "+ customer.getCustomerAddress());
}
public static void main(String[] args) {
CustomerMain customermain=new CustomerMain();
Customer customer1=customermain.CreateCustomer(1, "Ammu", "Kerala");
Customer customer2=customermain.CreateCustomer(2, "Meetha", "udaiii");
System.out.println("Customer Details");
customermain.display(customer1);
customermain.display(customer2);
}
}