Skip to content
Snippets Groups Projects
Select Git revision
  • a697b4fc8b3e5c9a7cd0c42ab4d73f48790f285c
  • master default
  • Project
3 results

Customer.java

Blame
  • Joel Andrew Wach's avatar
    Joel Andrew Wach authored
    44ad41a0
    History
    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];
    	}
     */