Respuesta :
Using the knowledge in computational language in JAVA, this code can be written as:
Writing code in JAVA:
public String toString() {
return this.firstName+" " + this.lastName ;
}
System.out.println("Enter First Name: ");
String firstName = input.nextLine();
System.out.println("Enter Last Name: ");
String lastName = input.nextLine();
System.out.println("Enter Home Address: ");
String homeAddress = input.nextLine();
Customer cus = new Customer(firstName, lastName, homeAddress);
System.out.println("\nWelcome: ");
System.out.print(cus.getFirstName() + cus.getLastName());
System.out.println("\n Your Shipping Address: ");
System.out.print(cus.getHomeShippingAddress());
List<Customer> customer = new ArrayList<Customer>();
customer.add(cus);
printList(customer);
}
public static void printList(List<Customer> list) {
System.out.println("Customers: ");
for (Customer customer : list) {
System.out.printf("%s", customer);
}
System.out.println();
}
This JAVA code describes a program in writecustomerlist. java that allows a user to input customer records.
See more about JAVA at brainly.com/question/12975450
#SPJ1
