Select Git revision
RequestController.php
Customer.java 1.61 KiB
package assignment2;
public class Customer {
private String customerCode;
private String type;
private String primaryContact;
private String name;
private String address;
Customer(String customerCode, String type, String primaryContact, String name,String address){
this.setCustomerCode(customerCode);
this.setType(type);
this.setPrimaryContact(primaryContact);
this.setName(name);
this.setAddress(address);
}
public String getCustomerCode() {
return customerCode;
}
public void setCustomerCode(String customerCode) {
this.customerCode = customerCode;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getPrimaryContact() {
return primaryContact;
}
public void setPrimaryContact(String primaryContact) {
this.primaryContact = primaryContact;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
}
/*public void readCustomer (){
String fileName = "data/Customer.dat";
Scanner s = null;
try {
s = new Scanner(new File(fileName));
} catch (FileNotFoundException e) {
e.printStackTrace();
}
String customer = "";
while(s.hasNext()) {
customer += s.next().trim();
}
s.close();
String[] parts = customer.split(";");
String customerCode = parts[0];
String type = parts[1];
String primaryContact = parts[2]; //this corresponds to a person in the person class.
String name = parts[3];
String address = parts[4];
}
*/